2010-06-03 20 views
42

--no-site-paketleri seçeneği ile bir virtualenv oluşturduk. Bir hata PIL yüklemeye çalışıyorum olsun:gcc hatası bir Python2.6 virtualenv yüklemeye çalışırken hata oluştu

http://pastebin.com/SVqxs1sC

... 
error: command '/usr/bin/gcc' failed with exit status 1 

---------------------------------------- 
Command /home/dustin/.virtualenvs/django1.2/bin/python -c "import setuptools; __file__='/home/dustin/.virtualenvs/django1.2/build/pil/setup.py'; execfile('/home/dustin/.virtualenvs/django1.2/build/pil/setup.py')" install --single-version-externally-managed --record /tmp/pip-t_oikl-record/install-record.txt --install-headers /home/dustin/.virtualenvs/django1.2/include/site/python2.6 failed with error code 1 
Exception information: 
Traceback (most recent call last): 
    File "/home/dustin/.virtualenvs/django1.2/lib/python2.6/site-packages/pip-0.7.2-py2.6.egg/pip/basecommand.py", line 120, in main 
    self.run(options, args) 
    File "/home/dustin/.virtualenvs/django1.2/lib/python2.6/site-packages/pip-0.7.2-py2.6.egg/pip/commands/install.py", line 165, in run 
    requirement_set.install(install_options) 
    File "/home/dustin/.virtualenvs/django1.2/lib/python2.6/site-packages/pip-0.7.2-py2.6.egg/pip/req.py", line 1243, in install 
    requirement.install(install_options) 
    File "/home/dustin/.virtualenvs/django1.2/lib/python2.6/site-packages/pip-0.7.2-py2.6.egg/pip/req.py", line 540, in install 
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False) 
    File "/home/dustin/.virtualenvs/django1.2/lib/python2.6/site-packages/pip-0.7.2-py2.6.egg/pip/__init__.py", line 226, in call_subprocess 
    % (command_desc, proc.returncode)) 
InstallationError: Command /home/dustin/.virtualenvs/django1.2/bin/python -c "import setuptools; __file__='/home/dustin/.virtualenvs/django1.2/build/pil/setup.py'; execfile('/home/dustin/.virtualenvs/django1.2/build/pil/setup.py')" install --single-version-externally-managed --record /tmp/pip-t_oikl-record/install-record.txt --install-headers /home/dustin/.virtualenvs/django1.2/include/site/python2.6 failed with error code 1 

birisi bana bu konuda yardımcı olabilir misiniz?

Ben senin pastebin linke tam liste çizgiyi

_imaging.c:75:20: error: Python.h: No such file or directory 

Looking Ubuntu 10.04 (64 bit)

cevap

81

Python-dev paketini kurmanız gerekir.

sudo apt-get install python-dev 
+5

Windows 7 ortamında yaşıyorum. Python-dev'i nasıl kurabilirim? – darren

+4

Sanalenv 2.6 kullanıyor beri benim durumumda 'python2.6-dev' yüklemek zorunda kaldı. CentOS/RHEL üzerindeyseniz, başka herkes için sadece bir kafa olsun – agscala

+4

'yum install python-devel'. – Banjer

3

koşuyorum sorundur.

onu bulmak için beklediğiniz yerde olurdu böylece gcc komut satırı

-I/usr/include/python2.6 

orada vardır ve bu benim Mandriva sistemdeyse yer zaten.

Belki de paketin karşılık gelen "-devel" sürümünde olan geliştirme kitaplıklarını değil, python'u yüklediniz.

0

sudo apt-get piton-dev yüklemek - Eğer ana sistemdeki birkaç piton kullanırsanız çok iyidir, ama ve python2.6 varsayılan olduğunu.

Eğer denerseniz: _imaging.c: Böyle hatayı alıyorum

pip install PIL 

:

virtualenv -p python2.7 

, bin dizinine gidin, kaynak daha aktif hale demek 75: 20 : hata: Python.h: böyle bir dosya ya da dizin

Sen demeliyim !:

sudo apt-get install python2.7-dev 
İlgili konular