Python Installation Imaging error: The _imaging C module is not installed problem solving method

Source: Internet
Author: User
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
  • Related Article

    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.