Today, write a python program upload pictures need to use the PIL library, so to http://www.pythonware.com/products/pil/#pil117下载了一个1.1.7 version, I use CentOS64 and install the PIL library with your own upgraded Python version
First Download Decompression:
Copy Code code 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 Code code 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 is always prompted: * * * The _imaging C module is not installed
Copy Code code as follows:
[Root@lee imaging-1.1.7]# python selftest.py
The _imaging C module is not installed
Looking for a long time, can not find out what is the reason, and then finally in the official website from a pile of English found the key, the solution, actually according to their own Python PiL path settings
Copy Code code 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