1. 先卸载PIL
yum install zlib zlib-devel
yum install libjpeg libjpeg-devel
yum install freetype freetype-devel
如果安装2步时
*** TKINTER support not available
*** JPEG support available
*** ZLIB (PNG/ZIP) support available
*** FREETYPE2 support available
*** LITTLECMS support not available
*** JPEG support available
*** ZLIB (PNG/ZIP) support available
*** FREETYPE2 support available
*** LITTLECMS support not available
则下载freetype zlib jpeg 源码包编译安装
2.pip install PIL --allow-external PIL --allow-unverified PIL 安装PIL
3.如果用时报错jpeg The _imaging C module is not installed
vim ~/.bashrc /etc/profile
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
source ~/.bashrc
source /etc/profile
vim /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/local/lib #添加此行 此时django开发环境也能用
/usr/local/lib #添加此行 此时django开发环境也能用
终端输入命令:ldconfig
2. ubuntu 安装 sudo apt-get install python-imaging

6万+

被折叠的 条评论
为什么被折叠?



