2011-01-12 25 views
6

pycurl instala bien en python2.6 pero me da el siguiente error cuando intento instalar en el 2,7 easy_install a través de MaverickProblemas instalar pycurl en python2.7.0 +

$ 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 

es de 2,7 no es compatible con pycurl?

Respuesta

8
sudo apt-get install python-dev 

Esto instala el paquete de desarrollo de Python que se requiere y soluciona el problema del archivo de encabezado faltante.

(Lea el comentario de Corey)

+1

nota que si 2.7 no es su Python por defecto, tendrá que hacer "sudo apt-get install python2.7-dev" en su lugar. –

+0

Point, lo actualizaré. – user225312

Cuestiones relacionadas