When installing Imaging in Python, The following error occurs: The _ imaging C module is not installed. imaging_imaging
The PIL library is required to write a Python program to upload images today. So I downloaded 1.1.7from http://www.pythonware.com/products/pil/?pil117. I used centos64 and installed the PIL library in the Python version after upgrade.
First download and 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 for Installation
Copy codeThe 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.
Copy codeThe 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.
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-install python selftest. py
Python 33 PIL: The _ imaging C module is not installed?
First, check whether you have the _ imaging module.
Check whether _ imaging is available on windows. pyd file (in some cases _ imaging. dll), and my directory is C: \ Python27 \ Lib \ site-packages \ PIL. Find _ imaging in Unix. so or _ imagingmodule. so
File, Some Unix platforms may have a. sl extension.
Use the following method to check the directory:
Open the command prompt, enter python-v, and then enter import Image
Another method is import sys, and print sys. path
Finally, if this is the case, enter import _ imaging in interactive mode and prompt
Then check whether the installed PIL matches your computer, 32-bit or 64-bit. Reinstall
In python image processing, the following error occurs at the beginning. How can this problem be solved?
Reinstall PIL