简体   繁体   中英

AWS EC2 machine giving “pytesseract.pytesseract.TesseractNotFoundError: tesseract not installed or it's not in your path”

I want to use tesseract-ocr on AWS EC2 machine using python.

I have install tesseract-ocr , pytesseract and set TESSDATA_PREFIX=/usr/local/share/tessdata... but still geting below error while calling image_to_string method of pytesseract.

pytesseract.pytesseract.TesseractNotFoundError: tesseract not installed or it's not in your path

you have to add tesseract installation folder to path too. if you have done that already, you might need to restart once or at least sign out and sign in. TESSDATA is the path you give for tesseract to access the language data.

Perhaps you have installed "pytesseract" with PIP

On Ubuntu ::

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

On MAC ::

brew install tesseract

After installing with the above commands, the problem will be resolved

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM