1. 安装PIL所需的系统库
- yum install zlib zlib-devel
- yum install libjpeg libjpeg-level
- yum install freetype freetype-devel
- pip install PIL
- *** TKINTER support not installed
- *** JPEG support not installed
- *** ZLIB (PNG/ZIP) support not installed
- *** FREETYPE2 support not installed
- *** LITTLECMS support not installed
- IOError: decoder jpeg not available
- wget http://effbot.org/downloads/Imaging-1.1.7.tar.gz
- tar xvfz Imaging-1.1.7.tar.gz
- python setup.py build_ext -i
-
- 修改setup.py:
- TCL_ROOT = "/usr/lib64/"
- JPEG_ROOT = "/usr/lib64/"
- ZLIB_ROOT = "/usr/lib64/"
- TIFF_ROOT = "/usr/lib64/"
- FREETYPE_ROOT = "/usr/lib64/"
- LCMS_ROOT = "/usr/lib64/"
-
- python setup.py
按照以上步骤安装正常了。
另外的一个方法 http://bluecrystal.iteye.com/blog/146490