Search code examples
pythonpython-imaging-libraryimporterror

Strange error: ImportError: No module named PIL


When I run Python, I get this error:

Traceback (most recent call last):
  File "<console>", line 1, in <module>
ImportError: No module named PIL

I don't understand what the problem could be.


Solution

  • PIL is deprecated, you must now use pillow.

    Run the command:

    pip install Pillow