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.
More Related Contents:
- “pip install unroll”: “python setup.py egg_info” failed with error code 1
- How to install pip with Python 3?
- The problem with installing PIL using virtualenv or buildout
- Can’t install new packages for Python (Python 3.9.0, Windows 10)
- ImportError: cannot import name _imaging
- Using hyphen/dash in python repository name and package name
- pip install . creates only the dist-info not the package
- Can’t install PIL after Mac OS X 10.9
- Pillow installed, but getting “no module named pillow” when importing
- PyCharm: ImportError no module named X?
- Does uninstalling a package with “pip” also remove the dependent packages?
- pip fails to install packages from requirements.txt
- Dealing with multiple Python versions and PIP?
- How do I create a namespace package in Python?
- How to install python modules without root access?
- How to reduce a jpeg size to a ‘desired size’?
- Python 3: ImportError “No Module named Setuptools”
- How do I generate circular thumbnails with PIL?
- python pip specify a library directory and an include directory
- pip ignores dependency_links in setup.py
- pyclipper installation error: “tp_print is not a member of _typeobject”
- PIL open() method not working with BytesIO
- How to install PIP on Python 3.6?
- Where does pip install its packages?
- Converting a PDF to a series of images with Python
- Flask(‘application’) versus Flask(__name__)
- can’t pip install mysql-python
- Detecting thresholds in HSV color space (from RGB) using Python / PIL
- How to install python3.7 and create a virtualenv with pip on Ubuntu 18.04?
- Why is the quality of JPEG images produced by PIL so poor?