- 使用PIL生成验证码,安装官方PIL时检查出现如下错误
-----------------------------------------------------------
*** TKINTER support not available (Tcl/Tk 8.4 libraries needed)
*** JPEG support not available
*** ZLIB (PNG/ZIP) support not available
*** FREETYPE2 support not available
-----------------------------------------------------------
To add a missing option, make sure you have the required
library, and set the corresponding ROOT variable in the
setup.py script.
pip install http://effbot.org/downloads/Imaging-1.1.6.tar.gz
* 其实最简单的办法就是先用命令pip uninstall PIL
卸载已有的PIL,然后安装PIL的fork版本Pillow,这是一个“友好”(friendly)的PIL版本,由Plone社区维护,主要用于Web开发上。
easy_install pillow
其他
- 第一步:
yum install python-devel
- 第二步:
yum install freetype-devel libjpeg-devel libpng-devel
sudo yum install libtiff-devel libjpeg-devel libzip-devel freetype-devel lcms2-devel libwebp-devel tcl-devel tk-devel
- 第三步:RPM包安装PIL
下载安装:ftp://rpmfind.net/linux/atrpms/f20-x86_64/atrpms/stable/PIL-1.1.7-10.1.fc20.x86_64.rpm
更多版本:http://rpmfind.net/linux/rpm2html/search.php?query=PIL&submit=Search+...&system=&arch=