Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't seem to run tesseract from command line despite adding PATH

I'm trying to add tesseract to be able to install pytesseract. I use Windows 7.

I add this path to my PATH environmental variable C:\Program Files (x86)\Tesseract-OCR\tesseract.exe

From the command line if I run

tesseract DMTX_screenshot.png out OR tesseract

I'm getting

tesseract is not recognized as an internal or external command.

Here is a copy-paste of the a portion of my environmental variable:

C:\Program Files (x86)\Tesseract-OCR\tesseract.exe;C:\Users\Moondra\Anaconda_related\Anaconda\geckodriver.exe;

Any ideas as to what I may be doing wrong?

Thank you.

like image 522
Moondra Avatar asked May 03 '17 18:05

Moondra


2 Answers

The PATH variable should include directories only, not files, such as C:\Program Files (x86)\Tesseract-OCR.

like image 69
nguyenq Avatar answered Oct 12 '22 00:10

nguyenq


The solution is the following you have to add cd first ...

Example:

cd C:\Program Files (x86)\Tesseract-OCR

C:\Program Files (x86)\Tesseract-OCR> tesseract --version
like image 28
ricardo valadez Avatar answered Oct 12 '22 00:10

ricardo valadez