ImportError: No module named Image

mihalios picture mihalios · Jan 30, 2014 · Viewed 210.3k times · Source

I have also tried

from PIL import Image

but it gives me ImportError: No module named PIL.

I have installed PIL successfully using

pip install pil

and I've also installed xcode command line tools. Nothing seem to work.

Details:

Mac OS X 10.9

Python 2.7.6

python is /Library/Frameworks/Python.framework/Versions/2.7/bin/python

python is /usr/bin/python

python is /usr/local/bin/python

Name: PIL

Version: 1.1.7

Location: /usr/local/lib/python2.7/site-packages/PIL

Answer

Martijn Pieters picture Martijn Pieters · Jan 30, 2014

The PIL distribution is mispackaged for egg installation.

Install Pillow instead, the friendly PIL fork.