Python Forum
Getting Tesseract to work for pytesseract - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Getting Tesseract to work for pytesseract (/thread-3184.html)



Getting Tesseract to work for pytesseract - bigmit37 - May-03-2017

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?