标签:style blog color io os 使用 ar for sp
1.先安装依赖包,
ubuntu
apt-get install python-dev
apt-get install libjpeg-dev apt-get install libjpeg8-dev apt-get install libpng3 apt-get install libfreetype6-dev ln -s /usr/lib/i386-linux-gnu/libfreetype.so /usr/lib ln -s /usr/lib/i386-linux-gnu/libjpeg.so /usr/lib ln -s /usr/lib/i386-linux-gnu/libz.so /usr/lib
redhat/centos
yum install python-devel libjpeg-turbo-devel libpng-devel freetype-devel
PIL还需要gcc编译器
2.最后使用pip安装PIL
pip install PIL --allow-unverified PIL --allow-all-external
安装完成后可以看到如下版本信息,可以看到PNG中支持JPEG/PNG/ZIP/FREETYPE2
PIL 1.1.7 SETUP SUMMARY
--------------------------------------------------------------------
version 1.1.7
platform linux2 2.7.5 (default, Sep 15 2014, 17:30:20)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-16)]
--------------------------------------------------------------------
*** TKINTER support not available
--- JPEG support available
--- ZLIB (PNG/ZIP) support available
--- FREETYPE2 support available
*** LITTLECMS support not available
--------------------------------------------------------------------
标签:style blog color io os 使用 ar for sp
原文地址:http://www.cnblogs.com/Mingxx/p/4012334.html