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 ="sample1.jpg") 
text = pytesseract.image_to_string(im, lang = 'eng') 


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, 2022 in Python by Aditya
• 7,680 points

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:

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, 2022 by Soham
• 9,700 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,560 points
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,560 points

edited Dec 11, 2018 by Nymeria 12,779 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,450 points