tesseract is not installed or it is not in your path

Created on 24 Jul 2018  Â·  12Comments  Â·  Source: tesseract-ocr/tesseract

Hi,
I am using tesseract in while loop in my script. But from time to time (once daily) I am getting this error. Tesseract is installed and works, but I get this message once per day. How to solve it?

Traceback:
File file.py, line 169, in <module> results.append(pytesseract.image_to_string(im))
File /usr/local/lib/python2.7/dist-packages/pytesseract/pytesseract.py, line 286, in image_to_string
return run_and_get_output(image, 'txt', lang, config, nice)
File /usr/local/lib/python2.7/dist-packages/pytesseract/pytesseract.py, line 201, in run_and_get_output
   raise TesseractNotFoundError()
pytesseract.pytesseract.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) : libpng 1.6.28 : libtiff 4.0.8 : zlib 1.2.8 : libwebp 0.5.2 : libopenjp2 2.1.2

system:
Raspberry Pi Linux Raspbian

Most helpful comment

I have faced the same issue, the solution is very easy,

pytesseract.pytesseract.tesseract_cmd = r"full path to the exe file"
pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files\Tesseract-OCR\tesseract.exe"

text = pytesseract.image_to_string(new_image, config='--psm 11')

worked fine for me.

All 12 comments

We don't support 3rd party software. Turn to the author of the script with your question.

@amitdo, my question is not about third party software. My question is why is tesseract working but suddenly once daily tesseract returns "tesseract is not installed or it's not in your path". When I start script again, then it works correctly again.

I'd try a newer version of Tesseract and also of the Python part.

@pete111: please read your post. @amitdo is right. It is 3rd party sw that claims "tesseract is not installed or it's not in your path". It is not tesseract error message e.g. there is nothing we can fix or solve.

I have faced the same issue "TesseractNotFoundError" in 3rd party software, in fact it was Out Of Memory problem, because when I stopped some services everything started working.

I have faced the same issue, the solution is very easy,

pytesseract.pytesseract.tesseract_cmd = r"full path to the exe file"
pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files\Tesseract-OCR\tesseract.exe"

text = pytesseract.image_to_string(new_image, config='--psm 11')

worked fine for me.

I have faced the same issue, the solution is very easy,

pytesseract.pytesseract.tesseract_cmd = r"full path to the exe file"
pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files\Tesseract-OCR\tesseract.exe"

text = pytesseract.image_to_string(new_image, config='--psm 11')

worked fine for me.

Thanks, it worked for me.

I have faced the same issue, the solution is very easy,
pytesseract.pytesseract.tesseract_cmd = r"full path to the exe file"
pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files\Tesseract-OCR\tesseract.exe"
text = pytesseract.image_to_string(new_image, config='--psm 11')
worked fine for me.

Thanks, it worked for me.

i could nt find the teeseract.exe in program files in my pc.so what shall i do now?

Hi,
I am using tesseract in while loop in my script. But from time to time (once daily) I am getting this error. Tesseract is installed and works, but I get this message once per day. How to solve it?

Traceback:
File file.py, line 169, in <module> results.append(pytesseract.image_to_string(im))
File /usr/local/lib/python2.7/dist-packages/pytesseract/pytesseract.py, line 286, in image_to_string
return run_and_get_output(image, 'txt', lang, config, nice)
File /usr/local/lib/python2.7/dist-packages/pytesseract/pytesseract.py, line 201, in run_and_get_output
   raise TesseractNotFoundError()
pytesseract.pytesseract.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) : libpng 1.6.28 : libtiff 4.0.8 : zlib 1.2.8 : libwebp 0.5.2 : libopenjp2 2.1.2

system:
Raspberry Pi Linux Raspbian

For Linux Distribution (Ubuntu)

try

sudo apt install tesseract-ocr
sudo apt install libtesseract-dev

Tq

On Fri, 22 May, 2020, 8:34 pm THARUN KUMAR TALLAPALLI, <
[email protected]> wrote:

Hi,
I am using tesseract in while loop in my script. But from time to time
(once daily) I am getting this error. Tesseract is installed and works, but
I get this message once per day. How to solve it?

Traceback:
File file.py, line 169, in results.append(pytesseract.image_to_string(im))
File /usr/local/lib/python2.7/dist-packages/pytesseract/pytesseract.py, line 286, in image_to_string
return run_and_get_output(image, 'txt', lang, config, nice)
File /usr/local/lib/python2.7/dist-packages/pytesseract/pytesseract.py, line 201, in run_and_get_output
raise TesseractNotFoundError()
pytesseract.pytesseract.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) : libpng 1.6.28 : libtiff 4.0.8 : zlib 1.2.8 : libwebp 0.5.2 : libopenjp2 2.1.2

system:
Raspberry Pi Linux Raspbian

For Linux Distribution (Ubuntu)

try

sudo apt install tesseract-ocr
sudo apt install libtesseract-dev

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/tesseract-ocr/tesseract/issues/1799#issuecomment-632740838,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AH5IC7AIVT4HBU2HLCIVKPDRS2IBHANCNFSM4FLQ3IRQ
.

I have faced the same issue, the solution is very easy,

pytesseract.pytesseract.tesseract_cmd = r"full path to the exe file"
pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files\Tesseract-OCR\tesseract.exe"

text = pytesseract.image_to_string(new_image, config='--psm 11')

worked fine for me.

where to add

pytesseract.pytesseract.tesseract_cmd = r"full path to the exe file"
pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files\Tesseract-OCR\tesseract.exe"

Please let me know,THX!

Thanks

On Fri, 25 Dec, 2020, 1:12 pm jinshui, notifications@github.com wrote:

I have faced the same issue, the solution is very easy,

pytesseract.pytesseract.tesseract_cmd = r"full path to the exe file"
pytesseract.pytesseract.tesseract_cmd = r"C:\Program
Files\Tesseract-OCR\tesseract.exe"

text = pytesseract.image_to_string(new_image, config='--psm 11')

worked fine for me.

where to add

pytesseract.pytesseract.tesseract_cmd = r"full path to the exe file"
pytesseract.pytesseract.tesseract_cmd = r"C:\Program
Files\Tesseract-OCR\tesseract.exe"

Please let me know,THX!

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/tesseract-ocr/tesseract/issues/1799#issuecomment-751199410,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AH5IC7AFSYDIOMO4KGGAIDLSWQ67ZANCNFSM4FLQ3IRQ
.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

YeisonVelez11 picture YeisonVelez11  Â·  5Comments

LaurentBerger picture LaurentBerger  Â·  3Comments

royudev picture royudev  Â·  5Comments

duzenko picture duzenko  Â·  3Comments

dthrock picture dthrock  Â·  5Comments