Skip to content Skip to sidebar Skip to footer

Package (Python PIL/Pillow) Installed But I Can't Import It

I want to do some image processing and I encountered a problem. Importing the pillow module doesn't seem to work. I found a simple script here to check what packages are installed

Solution 1:

You are importing incorrectly. Try using:

import PIL

or

from PIL import Image

PIL, i.e., Python Imaging Library is no longer maintained, Pillow is used instead. To maintain backwards compatibility, the PIL module name is used in imports.


Solution 2:

In fact, Pillow is installed under name "PIL", so:

import PIL as pillow
from PIL import Image
...

Look this:

enter image description here


Solution 3:

Checkout the doc:

http://pillow.readthedocs.org/handbook/tutorial.html

You must import it like that:

import PIL

Post a Comment for "Package (Python PIL/Pillow) Installed But I Can't Import It"