wget http://effbot.org/downloads/Imaging-1.1.6.tar.gz
直接build 你会发现依赖库JEPG 或者freetype2没有。
[root@qing186 Imaging-1.1.6]# python setup.py build
running buildrunning build_py
running build_ext
--------------------------------------------------------------------
PIL 1.1.6 BUILD SUMMARY
--------------------------------------------------------------------
version 1.1.6
platform linux2 2.6.7 (r267:88850, Aug 10 2011, 11:55:01)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)]
--------------------------------------------------------------------
*** TKINTER support not available
--- JPEG support not available
--- ZLIB (PNG/ZIP) support ok
--- FREETYPE2 support ok
--------------------------------------------------------------------
To add a missing option, make sure you have the required
library, and set the corresponding ROOT variable in the
setup.py script.
To check the build, run the selftest.py script.
running build_scripts
解决方法是:
1.安装好相关库,yum就可以安装了 --> yum install libjpeg-devel
2.打开并修改imaging的setup.py文件
FREETYPE_ROOT = NoneJPEG_ROOT = "/usr/lib64"
TIFF_ROOT = None
ZLIB_ROOT = None
TCL_ROOT = None
再build一次就可了。