2013-02-20 25 views
0

終端返回錯誤安博泰PIL不能setup.py的Python安裝3

[email protected]:~/Downloads/PIL-fork-1.1.7-py3# python3 setup.py build 
running build 
running build_py 
running build_ext 
building 'PIL._imaging' extension 
gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -fPIC -IlibImaging -I/usr/include -I/usr/local/include -I/usr/include/python3.2mu -c _imaging.c -o build/temp.linux-x86_64-3.2/_imaging.o 
_imaging.c:75:20: fatal error: Python.h: No such file or directory 
compilation terminated. 
error: command 'gcc' failed with exit status 1 
[email protected]:~/Downloads/PIL-fork-1.1.7-py3# 

這個文件是從http://www.lfd.uci.edu/~gohlke/pythonlibs/#pil 下載如何安裝此安博泰PIL的Python 3?

回答

2

按照下面的步驟來完成安裝PIL

sudo aptitude install python3-setuptools 
sudo easy_install3 pip 
sudo apt-get install python3-dev 
download the Pillow-master.zip 
wget https://github.com/python-imaging/Pillow/archive/master.zip 
go to downloaded directory and, 
sudo unzip Pillow-master.zip 
python3 setup.py build 
python3 setup.py install