1

I'm getting strange errors while using pytesseract, could someone please help. I'm using python 3.5 in jupyter notebook and here is what I tried:

pip install pillow
pip install pytesseract

I can see relevant folder in v3.5 environment, then in notebook I tried:

from PIL import Image
import pytesseract

print(pytesseract.image_to_string(Image.open("sample01.png")))

I have saved sample01.png in the same folder as my notebook. But the above line throws:

FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

TesseractNotFoundError                    Traceback (most recent call last)
<ipython-input-2-b37d854f093a> in <module>()
----> 1 print(pytesseract.image_to_string(Image.open("sample01.png")))

Appreciate any help!

PS: the solution was to first install tesseract from their github account and then follow the accepted answer on the linked question.

user2696565
  • 587
  • 1
  • 8
  • 17

0 Answers0