Solve the Pil "decoder JPEG not available" and "importerror: The _ imaging c module is not installed" Problems

Source: Internet
Author: User

After installing image in Python, I found that as long as imagefont is loaded, the _ imaging c module is not installed prompt is displayed, which was searched by Baidu Google.
It is found that all win system users use a package that has been compiled online. The answers in Linux are vague.

Perform the following operations (centos 5 64bit)

yum install libjpeg libjpeg-devel zlib zlib-devel freetype freetype-devel lcms lcms-devel

After installing the basic environment.
Wget http://effbot.org/downloads/Imaging-1.1.7.tar.gz
Tar zxvf Imaging-1.1.7.tar.gz
After entering
VI setup. py
Search
Freetype_root = none
Zlib_root = none
Replace
Zlib_root = ("/usr/lib64/", "/usr/include ")
Freetype_root = ("/usr/lib64 /",
"/Usr/include/FreeType2/FreeType ")
After saving and exiting,
Python setup. py build_ext-I
Python setup. py build
Python setup. py install

Basically, it is OK. Want to know if OK
Enter
Import imagefont
If there is no error, it will be o ..

 

From: http://blog.csdn.net/shellshine/article/details/8286210

Solve the Pil "decoder JPEG not available" and "importerror: The _ imaging c module is not installed" Problems

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.