标签:python
我的系统是mac os x yosemite 10.10
一、下载源码包
http://www.pythonware.com/products/pil/index.htm 下载最新版的PIL安装程序 ,我下载的是tar xfz Imaging-1.1.7.tar.gz
http://www.ijg.org 最新的版本是jpegsrc.v9a.tar.gz,安装jpeg库
http://www.gzip.org/zlib/ 下载zlib-1.2.8.tar.gz支持压缩功能的zlib库
二、安装
1.解压jpegsrc.v9a.tar.gz
cd jpeg-9a
./configure && make && make test && make install
2.解压 zlib-1.2.8.tar.gz
cd zlib-1.2.8
./configure && make && make install
3.解压xfz Imaging-1.1.7.tar.gz
cd Imaging-1.1.7
python setup.py build_ext -i
我的安装到这里出现了问题:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/tk.h:78:11: fatal error: 'X11/Xlib.h' file not found # include <X11/Xlib.h> ^找到解决方案如下:
sudo ln -s /opt/X11/include/X11 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/
sudo python setup.py install (ps:这里sudo 不然权限不够)
整个过程就完成了!!!!
版权声明:本文为博主原创文章,未经博主允许不得转载。
标签:python
原文地址:http://blog.csdn.net/qq403977698/article/details/47682551