Python installation Imaging error report: The _imaging C module is not installed

  • 2020-04-02 13:57:35
  • OfStack

Today to write a Python program to upload pictures to use PIL library, then to http://www.pythonware.com/products/pil/#pil117 to download a version 1.1.7, what I use is CentOS64 and upgraded Python version installed PIL library itself
First download unzip:


[root@lee ~]# wget http://www.pythonware.com/products/pil/#pil117
[root@lee ~]# tar -xf Imaging-1.1.7.tar.gz

Then prepare for installation

[root@lee ~]# cd Imaging-1.1.7
[root@lee Imaging-1.1.7]# python python setup.py build_ext -i

*** The _imaging C module is not installed

[root@lee Imaging-1.1.7]# python selftest.py
*** The _imaging C module is not installed

After searching for a long time, I could not find out the reason. Finally, I found the key point from a pile of English on the official website. The solution was actually set according to my python PIL path

[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

Reinstall python selftest.py and install it all the way


Related articles: