question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ModuleNotFoundError: No module named 'PIL'

See original GitHub issue

I am trying to get pytesseract to run on a Windows 10 system but unfortunately always get the following error log:

  File "C:\Users\Marc\PycharmProjects\test\venv\lib\site-packages\pytesseract\pytesseract.py", line 27, in <module>
    from PIL import Image
ModuleNotFoundError: No module named 'PIL'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Marc\PycharmProjects\test\main.py", line 15, in <module>
    import pytesseract
  File "C:\Users\Marc\PycharmProjects\test\venv\lib\site-packages\pytesseract\__init__.py", line 2, in <module>
    from .pytesseract import ALTONotSupported
  File "C:\Users\Marc\PycharmProjects\test\venv\lib\site-packages\pytesseract\pytesseract.py", line 29, in <module>
    import Image
ModuleNotFoundError: No module named 'Image'

Process finished with exit code 1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:16

github_iconTop GitHub Comments

2reactions
ChipmunkVcommented, Jan 25, 2022

Updating either pip or setuptools solves the problem. Versions that don’t work: pip 20.0.2, setuptools 45.2.0. Versions that do: pip 21.3.1, setuptools 60.5.0.

2reactions
halvomezcommented, Jul 21, 2021

hi, it’s ok with version 0.3.7, but 0.3.8 crash with same error

from .pytesseract import ALTONotSupported File "/tmp/pip-install-wt3k8kh5/pytesseract/pytesseract/pytesseract.py", line 28, in <module> import Image ModuleNotFoundError: No module named 'Image'

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImportError: No module named PIL - Stack Overflow
Still got the same error. Then, I tried to import an image, it says 'No module named image' found. I installed image using...
Read more >
ModuleNotFoundError: No module named 'PIL' in Python
The Python "ModuleNotFoundError: No module named 'PIL'" occurs when we forget to install the Pillow module before importing it or install it ...
Read more >
[SOLVED] Python No Module Named Pil
The Python interpreter may not detect specific modules when imported. Therefore, upon execution, Python will return the ModuleNotFoundError: No ...
Read more >
ModuleNotFoundError: No module named 'PIL' - Python Help
I installed Pillow. ... What version of Python are you using to run the script? You have to install Pillow for each and...
Read more >
Modulenotfounderror: no module named pil ( Solved )
Modulenotfounderror : no module named pil error occurs if the pillow package is not installed or not properly configured. The best way to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found