0

I faced the following error when I try to install PIL 1.1.7 failed on python 2.7.10 on MAC OS X

--------------------------------------------------------------------
PIL 1.1.7 SETUP SUMMARY
--------------------------------------------------------------------
 version       1.1.7
 platform      darwin 2.7.10 (default, Oct 23 2015, 19:19:21)
              [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)]
--------------------------------------------------------------------
--- TKINTER support available
*** JPEG support not available
--- ZLIB (PNG/ZIP) support available
*** FREETYPE2 support not available
*** LITTLECMS support not available
--------------------------------------------------------------------
 To add a missing option, make sure you have the required
 library, and set the corresponding ROOT variable in the
 setup.py script.
Deng Haijun
  • 109
  • 1
  • 8
  • This does not look like an error. It just seems to be a summary of the setup informing you, which libraries are available. Are you sure something failed? – sietschie Apr 26 '16 at 13:18
  • @sietschie yes, I face error when I try to use PIL image `ImportError: The _imagingft C module is not installed` – Deng Haijun Apr 26 '16 at 13:21

2 Answers2

1

The message ImportError: The _imagingft C module is not installed appears apparently, when the library freetype is not installed. Therefore, to fix this error you need to install freetype and recompile PIL.

Community
  • 1
  • 1
sietschie
  • 7,425
  • 3
  • 33
  • 54
  • yes, it works after I install free type via `brew install freetype` and re-install PIL again. – Deng Haijun Apr 26 '16 at 13:44
  • Happy to help. If this answer solved your issue, please mark it as accepted by clicking the green check mark. This helps keep the focus on older SO which still don't have answers. – sietschie Apr 26 '16 at 15:52
0

I had a similar problem when i upgrade my pip,here is what i did(Mac OS 10.11, python 2.7.11).

First of all,you are better use PIL 1.1.6,because 1.1.7 have many problems on python 2.7 on MAC OS X.

Here is how to install PIL 1.1.6:

1.Download PIl : http://www.pythonware.com/products/pil/ (ver1.1.6 more compatible with python 2.7,ver1.1.7 have many problems)

2.Run this code in your terminal(cd to your download directory)

$ tar xvfz Imaging-1.1.6.tar.gz
$ cd Imaging-1.1.6
$ python setup.py install

3.Use 'pip list' to check your PIL.and if your also install pillow,you can only use one of them.so if you want to use PIL only , uninstall pillow by

sudo -s    
pip uninstall pillow