to your account
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
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?
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)
sudo apt install tesseract-ocr
sudo apt install libtesseract-dev
RaviSolanki01, amritshukla001, Al0ne-collab, immu0001, ataftaf, ulevon, and malodhi reacted with thumbs up emoji
immu0001 reacted with hooray emoji
All reactions
On Fri, 22 May, 2020, 8:34 pm THARUN KUMAR TALLAPALLI, < ***@***.***> wrote:
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)
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
<
#1799 (comment)>,
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!
On Fri, 25 Dec, 2020, 1:12 pm jinshui, ***@***.***> 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
<
#1799 (comment)>,
or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/AH5IC7AFSYDIOMO4KGGAIDLSWQ67ZANCNFSM4FLQ3IRQ>
i face same issue. first download tesseract if not in your system. link : https://github.com/UB-Mannheim/tesseract/wiki
second, install and check the necessary language during the process of installation
third: add tesseract to your path. use: right click on start menu for windows -> click on system -> system info -> advance setting -> environment variable -> add new variable ( Variable Name: TESSDATA_PREFIX, value: "c:\program file\ Tesseract-OCR) -> ok
fourth step is to : pip install tesseract (for vscode) and also pip install pytesseract
last step: add the file path to your current python script: pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files\Tesseract-OCR\tesseract.exe" . Note this file path depends on where you installed tesseract.
In Case of the user have installed it for user only the path will be in the user folder for windows
Like :
C:\Users\<User.Name>\AppData\Local\Tesseract-OCR\tesseract.exe
using same in code works fine
pytesseract.pytesseract.tesseract_cmd = r'C:\Users\John.Doe\AppData\Local\Tesseract-OCR\tesseract.exe'