0

I am trying to install Pillow on mavericks with no luck.

I have tried:

pip install Pillow

The install works great.

However I get the error:

ImportError: No module named PIL

On this line of code in my script:

from PIL import Image, ImageFont, ImageDraw

I have no idea whats wrong. Ideas?

lostintranslation
  • 23,756
  • 50
  • 159
  • 262
  • Do you have more than one version of Python installed? Likely what is happening is you are installing `Pillow` with one version (say, the system Python) and trying to import it with another version (from python.org, Homebrew, etc.). – MattDMo Aug 12 '14 at 02:02

2 Answers2

0

@MattDMo was right.

I had done brew install python to install python with homebrew leaving with system python and homebrew python.

I removed that brew and did an easy_install pip, then pip install Pillow.

Everything is working great now

lostintranslation
  • 23,756
  • 50
  • 159
  • 262
-1

Just try:

import Image

In some installs, Import PILworks, in some others import Imageis the one that works.

It is quite confusing.

Mikel Pascual
  • 2,202
  • 18
  • 27
  • This is not true. `import PIL` and/or `from PIL import ...` work just fine with Pillow on Linux, OS X, and Windows. – MattDMo Aug 12 '14 at 02:03