Today, the Python program upload images need to use the PIL library, so to http://www.pythonware.com/products/pil/#pil117下载了一个1.1.7 version, I'm using CentOS64. and install the PIL library in the self-upgraded Python version
First download Unzip:
Copy CodeThe code is as follows:
[Root@lee ~]# wget http://www.pythonware.com/products/pil/#pil117
[Root@lee ~]# tar-xf imaging-1.1.7.tar.gz
then prepare to install
Copy CodeThe code is as follows:
[Root@lee ~]# CD Imaging-1.1.7
[Root@lee imaging-1.1.7]# python python setup.py build_ext-i
No problem, when the test installation, but the old hint: * * The _imaging C module is not installed
Copy CodeThe code is as follows:
[Root@lee imaging-1.1.7]# python selftest.py
The _imaging C module is not installed
Looking for a long, can not find out what is the reason, and finally in the official website from a pile of English found the key, the solution, the actual according to their own Python PiL path settings
Copy CodeThe code is as follows:
[Root@lee imaging-1.1.7]# Echo '/usr/local/lib/python2.7/site-packages/pil ' >>/etc/ld.so.conf
[Root@lee imaging-1.1.7]# Ldconfig
Re-python selftest.py, installation complete