37

I installed the Pillow package with:

python -m pip install pillow

Got success message (Successfully installed pillow). Closed and re-opened the terminal.

But when I try to:

import pillow

I get the error message:

ImportError: No module named pillow

If python -m pip install pillow is run again, it says

Requirement already satisfied (use --upgrade to upgrade): pillow in c:\python27\lib\site-packages
Emma
  • 27,428
  • 11
  • 44
  • 69
billrichards
  • 2,041
  • 4
  • 25
  • 35

1 Answers1

61

Try using

import PIL

or

from PIL import ...

instead. Pillow is a fork of PIL, the Python Imaging Library, which is no longer maintained. However, to maintain backwards compatibility, the old module name is used.

MattDMo
  • 100,794
  • 21
  • 241
  • 231