New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ModuleNotFoundError: No module named 'PIL' #316
Comments
Okay I must have messed up my installed pip packages. Created a new Python project, installed pytesseract and everything works. |
may i know how u closed the error i am having the same issue.. During handling of the above exception, another exception occurred: Traceback (most recent call last): |
Hi @sudhan-c -- it seems that your setup/virtual environment might have some kind of problem. |
hi, it's ok with version 0.3.7, but 0.3.8 crash with same error
|
Can you try installing the |
While this issue is closed, I've observed something interesting -- but I don't know where the breakdown is. I'm installing pytesseract (no version specified) as in a requirements.txt
Adding Pillow prior to pytesseract in the requirements.txt appears to do something, but I still get the issue as above. However, if, and only if, I explicitly run |
Steps to reproduce:
Something is wrong with pytesseract package dependencies. |
Okay, since this problem affects several people, I am reopening this issue. |
Thank you very much for reporting this. I will have to investigate why it suddenly stated failing -- I suspect pip. |
@liebig @ChipmunkV Ok, so Pillow requires python 3.7 or higher, because python 3.6 is End of Life. docker run -it --rm ubuntu:focal bash
apt -y update
apt -y install python3-pip git
pip3 install -U git+https://github.com/madmaze/pytesseract.git If this works, I can create a new release. |
Same error (sorry, haven't included it the first time). Python 3.8.10
|
Hmm, I literally just ran this thru CI testing and it worked without a problem. virtualenv venv
. venv/bin/activate
pip install -U git+https://github.com/madmaze/pytesseract.git
pip list Also, this error is from within a fresh Ubuntu focal container, right? |
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. |
Yeah ... It seems that Pillow depends on newer versions of those tools, for reference they even include the update step in the Pillow - Installation docs Now I have to find which is the minimum version of those tools that allow proper installation and include them to the setup requirements ... |
The new pytesseract version should fix this for now. |
ChipmunkV thanks for that. Updating these packages worked! |
I am trying to get pytesseract to run on a Windows 10 system but unfortunately always get the following error log:
The text was updated successfully, but these errors were encountered: