• Register
search
Log In
0 votes
3.5k views

Problem :

I am getting following error:

pytesseract.pytesseract.tesseractnotfounderror: tesseract is not installed or it's not in your path

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

36.1k points

Related questions

1 vote
1 answer 84 views
84 views
Problem: I was trying some code in python using pytesseract but it shows the error message: Pytesseract : TesseractNotFound Error: tesseract is not installed or it's not in your path I wrote the code: from PIL import image import pytesseract ig = image.open( myself.jpg ) ... ig, lang='eng') print(setup) I instaled pytesseract but it is not showing now and how can I fix this problem please help.
asked Apr 24 samhaz 5k points
0 votes
1 answer 66 views
66 views
I am new to python programming language and I don;t know how to fix it. This is my code below : from PIL import image import pytesseract ig = image.open(“Horse.jpg”) text = pytesseract.image_to_string(ig, lang=’eng’) print(text)
asked Mar 8 sstones 220 points
0 votes
1 answer 133 views
133 views
Problem : When I try to run following command: python manage.py updatestats I get the error as below: “TypeError: int() argument must be a string, a bytes-like object or a number, not 'list'” I am unable to figure out ... ) File "/Users/alecxe/project/Dev/project_files/project/main/management/commands/updatestats.py", line 34, in handle unique_visits=display_unique_visits(hostname),)
asked Jan 2 alecxe 7.5k points
0 votes
1 answer 1K views
1K views
Problem : I am facing the issue in passing a function as a parameter to another function as follows typeerror: int() argument must be a string, a bytes-like object or a number, not 'nonetype'
asked Nov 18, 2019 peterlaw 6.9k points
0 votes
1 answer 535 views
535 views
Problem : MySample.csv contains the below details : NAME Id No Dept Tommy 1 12 CS Jimmy 2 35 EC Bonny 3 21 IT Franky 4 61 EE And my Python file contains the below code : import csv myifile = open('mysample.csv', "rb") read = csv.reader(myifile) for row in read : ... in for row in read : _csv.Error: iterator should return strings, not bytes (did you open the file in text mode?) How should I fix it?
asked Jan 2 alecxe 7.5k points