Package (Python PIL/Pillow) installed but I can’t import it

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.

Leave a Comment