2011-01-12 13 views
6

pycurl installiert auf python2.6 in Ordnung, aber ich bekomme die folgende Fehlermeldung wenn ich versucheProbleme bei der Installation pycurl auf python2.7.0 +

auf Einzelgänger auf 2.7 über easy_install zu installieren in
$ sudo easy_install pycurl 
install_dir /usr/local/lib/python2.7/dist-packages/ 
Searching for pycurl 
Reading http://pypi.python.org/simple/pycurl/ 
Reading http://pycurl.sourceforge.net/ 
Reading http://pycurl.sourceforge.net/download/ 
Best match: pycurl 7.19.0 
Downloading http://pycurl.sourceforge.net/download/pycurl-7.19.0.tar.gz 
Processing pycurl-7.19.0.tar.gz 
Running pycurl-7.19.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-PFzxzf/pycurl-7.19.0/egg-dist-tmp-oAFjdV 
Using curl-config (libcurl 7.21.0) 
src/pycurl.c:42: fatal error: Python.h: No such file or directory 
compilation terminated. 
error: Setup script exited with error: command 'gcc' failed with exit status 1 

Bin 2.7 nicht mit pycurl kompatibel?

Antwort

8
sudo apt-get install python-dev 

Dies installiert das Python-Entwicklungspaket, das erforderlich ist, und behebt das Problem der fehlenden Header-Datei.

(Bitte lesen Sie den Kommentar von Corey)

+1

zur Kenntnis, dass, wenn 2.7 nicht Ihr Standard-Python ist, Sie "sudo apt-get install python2.7-dev" stattdessen tun wollen. –

+0

Punkt, ich werde es aktualisieren. – user225312

Verwandte Themen