When installing Imaging in Python, the following error occurs: The_imagingCmoduleisnotinstalled. how can this problem be solved?

Source: Internet
Author: User
This article mainly introduces how to solve the problem of installing Imaging in Python: The_imagingCmoduleisnotinstalled. it turns out that the library file of the PIL library is not added to the system, and this error is always prompted, for more information about how to use the PIL library to upload images by writing Python programs today, go to http://www.pythonware.com/products/pil/#pil117to download a 1.1.7. I use centos64 and install the PIL library in the Python version after upgrade.
First Download and unzip:

The 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 for installation

The code is as follows:


[Root @ lee ~] # Cd image-1.1.7
[Root @ lee Imaging-1.1.7] # python setup. py build_ext-I


No problem. during The test and installation, The system always prompts: *** The _ imaging C module is not installed.

The code is as follows:


[Root @ lee Imaging-1.1.7] # python selftest. py
* ** The _ imaging C module is not installed


After searching for a long time, I couldn't find out why. later, I found the key to the problem from a bunch of English files on the official website. the solution is to set the path based on my own python PIL path.

The 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-install python selftest. py

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.