Call the import Imagefont times on the server the following error
Importerror:the _imagingft C module is not installed
(Server is Centos5.5, Python version 2.7.3)
The first reaction is a problem with PiL installation, via yum install Freetype-devel libjpeg-devel libpng-devel
Reinstall the dependent libraries, then uninstall PIL via Pip uninstall-y pil, then to http://effbot.org/downloads/ imaging-1.1.7.tar.gz Download the source package, modify set.py in Jpeg_root, Zlib_root,freetype_root and other paths, and then execute
Python setup.py build_ext-i
Python setup.py Build
Python setup.py Install
The problem is still the same after reinstalling.
Later accidentally found an article on the official website: http://effbot.org/zone/pil-imaging-not-installed.htm, some inspiration, first judge _imaging whether the normal installation, if the installation process without error, Under the PIL package should be able to find, my/usr/local/python-2.7.3/lib/python2.7/site-packages/pil/_imaging.so (filename suffix varies by operating system, such as _ Imaging.pyd or _imaging.dll), the next step is to determine if Python can find _imaging.so, which is found through the python-v, and then executes the debug message displayed by the import image _ Imaging.so whether to be imported, if this step is OK, it is _imaing.so itself problem, sure enough in Python execution: import _imaing, hint
»> Import _imaging
Traceback (most recent):
File "<stdin>", line 1, in <module>
Importerror:libjpeg.so.7:cannot open Shared object file:no such file or directory
Note The system cannot find the LIBJPEG.SO.7 library in the specified directory, and libjpeg is installed properly, Whereis libjpeg.so.7 can find the actual installation path (/usr/local/lib/ libjpeg.so.7), only need to build a soft link to the actual installation path under the system's search path (ln-s/usr/local/lib/libjpeg.so.7/usr/lib/)
Whereis libjpeg.so.7