• Register
Welcome to Kodlogs, programming questions and answer website.
0 votes
13 views

Problem :

I am getting bellow error
pytesseract.pytesseract.tesseractnotfounderror: tesseract is not installed or it's not in your path
by (6.9k points)  

1 Answer

0 votes

Solution :

I faced the same problem in the past.

I hope you have properly installed it and have also done 

pip install pytesseract.

If everything is correctly done then you should see that the path C:\Program Files (x86)\Tesseract-OCR where tesseract.exe is available.

Adding Path variable did not helped me So I added new variable with name tesseract in environment variables with a value of C:\Program Files (x86)\Tesseract-OCR\tesseract.exe.

Now typing tesseract in the command line should work by giving your usage informations. Now you can use pytesseract as such  

Note : Please restart your python kernel before running this.

import pytesseract
from PIL import Image

value=Image.open("text_image.png")
text = pytesseract.image_to_string(value, config='')    
print("text present in images:",text)

Further Readings :

https://github.com/tesseract-ocr/tesseract/issues/1799

by (20.3k points)  
...