How do I resolve a TesseractNotFoundError?

前端 未结 22 2100
情话喂你
情话喂你 2020-11-28 05:14

I am trying to use pytesseract in Python but I always end up with the following error:

    raise TesseractNotFoundError()
pytesseract.pytesseract.TesseractNo         


        
22条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-28 05:35

    This occurs under windows (at least in tesseract version 3.05) when the current directory is on a different drive from where tesseract is installed.

    Something in tesseract is expecting data files to be in \Program Files... (rather than C:\Program Files, say). So if you're not on the same drive letter as tesseract, it will fail. It would be great if we could work around it by temporarily changing drives (under windows only) to the tesseract installation drive before executing tesseract, and changing back after. Example in your case: You can copy yourmodule_python.py to "C/Program Files (x86)/Tesseract-OCR/" and RUN!

提交回复
热议问题