Pytesseract TesseractNotFound Error tesseract is not installed or it s not in your path how do I fix this

0 votes

I'm trying to run a basic and very simple code in python.

from PIL import 
Image import pytesseract 

im = Image.open("sample1.jpg") 
text = pytesseract.image_to_string(im, lang = 'eng') 

print(text)

This is what it looks like and also I have installed tesseract for windows through the installer. I'm very new to Python, and I'm unsure how to proceed? Any guidance here would be very helpful. I've tried restarting my Spyder application but to no benefit. 

Feb 16 in Python by Aditya
• 7,280 points
96 views

1 answer to this question.

0 votes

Based on my recent experience with this pytesseract error on Windows, I have written different steps in sequence to make it easier to resolve the error:

1. Install tesseract using windows installer available at: https://github.com/UB-Mannheim/tesseract/wiki

2. Note the tesseract path from the installation. Default installation path at the time of this edit was: C:\Users\USER\AppData\Local\Tesseract-OCR. It may change so please check the installation path.

3. pip install pytesseract

4. Set the tesseract path in the script before calling image_to_string:

pytesseract.pytesseract.tesseract_cmd = r'C:\Users\USER\AppData\Local\Tesseract-OCR\tesseract.exe'

answered Feb 16 by Soham
• 8,730 points

Related Questions In Python

0 votes
1 answer

How do I check if input string is a valid regular expression or not in Python?

Hi. Good question! Well, just like what ...READ MORE

answered Feb 12, 2019 in Python by Nymeria
• 3,540 points
9,135 views
0 votes
1 answer

How do I use urllib to see if a website is 404 or 200 in Python?

For Python 3, try doing this: import urllib.request, ...READ MORE

answered Nov 29, 2018 in Python by Nymeria
• 3,540 points

edited Dec 11, 2018 by Nymeria 10,301 views
0 votes
1 answer

How do I determine if my python shell is executing in 32bit or 64bit mode on OS X?

UPDATED: One way is to look at sys.maxsize as ...READ MORE

answered Dec 11, 2018 in Python by aryya
• 7,440 points
1,188 views
0 votes
0 answers

How do I fix this Set function in python?

I have the following code below I ...READ MORE

May 20, 2020 in Python by Olufemiodubote
• 120 points
312 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 2,753 views
0 votes
1 answer
0 votes
1 answer

'Conda' is not recognized as internal or external command

I was coming across the same issue ...READ MORE

answered Feb 11 in Python by Soham
• 8,730 points
597 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP