How do I resolve a TesseractNotFoundError?

前端 未结 22 2107
情话喂你
情话喂你 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:45

    Under Windows 10 OS environment, the following method works for me:

    1. https://github.com/tesseract-ocr/tesseract/wiki Download tesseract and install it. Windows version is available here: https://github.com/UB-Mannheim/tesseract/wiki

    2. Find script file pytesseract.py from C:\Users\User\Anaconda3\Lib\site-packages\pytesseract and open it. Change the following code from tesseract_cmd = 'tesseract' to: tesseract_cmd = 'D:/Program Files (x86)/Tesseract-OCR/tesseract.exe'

    3. You may also need add environment variable D:/Program Files (x86)/Tesseract-OCR/

    Hope it works for you!

提交回复
热议问题