TesseractNotFoundError: tesseract is not installed or it's not in your path

tesseractnotfounderror: tesseract is not installed or it's not in your path anaconda
install tesseract windows
tesseract ocr
how to check if tesseract is installed
tesseractnotfounderror: tesseract is not installed or it's not in your path linux
install tesseract mac
install tesseract 4 ubuntu
tesseract python

I am trying to use tesseract-OCR to print text from the image. But I am getting the above error. I have installed tesseract OCR using https://github.com/UB-Mannheim/tesseract/wiki and pytesseract in the anaconda prompt using pip install pytesseract but its not working. Please help if anyone has faced the similar issue.

(base) C:\Users\500066016>pip install pytesseract Collecting pytesseract Downloading https://files.pythonhosted.org/packages/13/56/befaafbabb36c03e4fdbb3fea854e0aea294039308a93daf6876bf7a8d6b/pytesseract-0.2.4.tar.gz (169kB) 100% |████████████████████████████████| 174kB 288kB/s Requirement already satisfied: Pillow in c:\users\500066016\appdata\local\continuum\anaconda3\lib\site-packages (from pytesseract) (5.1.0) Building wheels for collected packages: pytesseract Running setup.py bdist_wheel for pytesseract ... done Stored in directory: C:\Users\500066016\AppData\Local\pip\Cache\wheels\a8\0c\00\32e4957a46128bea34fda60b8b01a8755986415cbab3ed8e38 Successfully built pytesseract

Below is the code:

import pytesseract
import cv2
import numpy as np

def get_string(img_path):
    img = cv2.imread(img_path)
    img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
    kernel = np.ones((1,1), np.uint8)
    dilate = cv2.dilate(img, kernel, iterations=1)
    erosion = cv2.erode(img, kernel, iterations=1)

    cv2.imwrite('removed_noise.jpg', img)
    img = cv2.adaptiveThreshold(img, 255, cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY, 11, 2)
    cv2.imwrite('thresh.jpg', img)
    res = pytesseract.image_to_string('thesh.jpg')
    return res
print('Getting string from the image')
print(get_string('quotes.jpg'))

Below is the error:

Traceback (most recent call last):

File "", line 1, in runfile('C:/Users/500066016/.spyder-py3/project1.py', wdir='C:/Users/500066016/.spyder-py3')

File "C:\Users\500066016\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 705, in runfile execfile(filename, namespace)

File "C:\Users\500066016\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile exec(compile(f.read(), filename, 'exec'), namespace)

File "C:/Users/500066016/.spyder-py3/project1.py", line 23, in print(get_string('quotes.jpg'))

File "C:/Users/500066016/.spyder-py3/project1.py", line 20, in get_string res = pytesseract.image_to_string('thesh.jpg')

File "C:\Users\500066016\AppData\Local\Continuum\anaconda3\lib\site-packages\pytesseract\pytesseract.py", line 294, in image_to_string return run_and_get_output(*args)

File "C:\Users\500066016\AppData\Local\Continuum\anaconda3\lib\site-packages\pytesseract\pytesseract.py", line 202, in run_and_get_output run_tesseract(**kwargs)

File "C:\Users\500066016\AppData\Local\Continuum\anaconda3\lib\site-packages\pytesseract\pytesseract.py", line 172, in run_tesseract raise TesseractNotFoundError()

TesseractNotFoundError: tesseract is not installed or it's not in your path


Step 1: Download and install Tesseract OCR from this link.

Step 2: After installing find the "Tesseract-OCR" folder, double Click on this folder and find the tesseract.exe.

Step 3: After finding the tesseract.exe, copy the file location.

Step 4: Pass this location into your code like this

pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files\Tesseract-OCR\tesseract.exe"

Note: C:\Program Files\Tesseract-OCR\tesseract.exe == your copied location

Pytesseract : "TesseractNotFound Error: tesseract is not installed or , I see steps are scattered in different answers. Based on my recent experience with this pytesseract error on Windows, writing different steps in  pytesseract.pytesseract.tesseractnotfounderror: tesseract is not installed or it's not in your path. So now that you know the root cause, what is the solution? How To Fix pytesseract.pytesseract.tesseractnotfounderror? To fix this problem, you have to follow these few simple steps: Make sure that Tesseract application is installed.


tesseract is not installed or it is not in your path · Issue #1799 , TesseractNotFoundError: tesseract is not installed or it's not in your path. version: tesseract 3.04.01 leptonica-1.74.1 libgif 5.1.4 : libjpeg 6b (libjpeg-turbo 1.5.1)  Install it from here; Run pip install pytesseract; Adding a new variable called 'tesseract' in environment variables with a value of . C:\Program Files (x86)\Tesseract-OCR\tesseract.exe. If you run tesseract in the command line should work by giving you usage information. That's it :)


it is clear from the error that your system is unable to find tesseract package if you are on windows simply run following command in your command prompt.

pip install tesseract

hope it will solve your problem :)

image_to_osd: tesseract is not installed or it's not in your path · Issue , However, when I run image_to_osd ( print(image_to_osd(img, lang='spa')) ) I get '​TesseractNotFoundError: tesseract is not installed or it's not in  TesseractNotFoundError: tesseract is not installed or it's not in your path Hot Network Questions What is the English maxim for "Rather losing a material / piece, than losing a tempo / an initiative"?


pytesseract.pytesseract.tesseractnotfounderror: tesseract is not , 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  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.


Tesseract is not installed or it's not in your path, Python-tesseract is a python wrapper for Google's Tesseract-OCR. get_tesseract_version Returns the Tesseract version installed in the system. custom configuration flags that are not available via the pytesseract function. However, if you don’t want to set system environment for Tesseract OCR, you can add this code in your python script. from PIL import Image import pytesseract pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files\Tesseract-OCR\tesseract.exe"


pytesseract · PyPI, raise TesseractNotFoundError() pytesseract.pytesseract.TesseractNotFoundError​: tesseract is not installed or it's not in your path. However, pytesseract and  Step 1: Download and install Tesseract OCR from this link. Step 2: After installing find the "Tesseract-OCR" folder, double Click on this folder and find the tesseract.exe. Step 3: After finding the tesseract.exe, copy the file location. Step 4: Pass this location into your code like this