Python Forum
Getting Tesseract to work for pytesseract
Thread Rating:
  • 2 Vote(s) - 1.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting Tesseract to work for pytesseract
#1
I'm trying to use pytesseract but it seems I have to first install Tesseract on my windows OS and get it working properly first on Windows before I can use the python wrapper. 

I have installed it properly, but I'm having trouble getting it working from the command line, which seems necessary if I want to use the Python wrapper.


I've add this path to the PATH Environmental Variables

C:\Program Files (x86)\Tesseract-OCR\tesseract.exe, which assumed allow me to run tesseract from the command line by using the command 'tesseract'

The image is in my current directory, which is C:\User\Moondra

The command I tried was :

tesseract DMTX_screenshot.png out
But I"m getting the error, tesseract is not recognized as an internal or external command.


I double checked with my python code, and I get this error. 


from PIL import Image
from pytesseract import image_to_string

#print image_to_string(Image.open('test.png'))
image_to_string(Image.open('KDMN_screenshot.png')
FileNotFoundError: [WinError 2] The system cannot find the file specified


Any ideas what I may be doing wrong?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Help with CV2 pytesseract detcet numbers korenron 0 1,449 Apr-29-2021, 02:48 PM
Last Post: korenron
  help with pytesseract.image_to_string(savedImage, config='--psm 11')iamge to string korenron 0 2,648 Apr-29-2021, 10:08 AM
Last Post: korenron
  PYTesseract Problem gw1500se 2 3,073 Mar-26-2020, 02:11 PM
Last Post: gw1500se
  Error when executing pytesseract to get the text from image bvdinesh 3 17,735 Oct-19-2019, 05:01 PM
Last Post: cwco00
  pytesseract - enhance image before OCR kerzol81 0 3,684 Nov-19-2018, 06:21 PM
Last Post: kerzol81

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020