【问题标题】:How to solve Tesseract Not Found Error, Anaconda?如何解决 Tesseract Not Found Error,Anaconda?
【发布时间】:2020-08-02 17:13:27
【问题描述】:

所以我的 conda 版本是 4.8.3,我是新安装的 tesseract 和 anaconda。使用以下命令安装 tesseract:

`conda install -c conda-forge pytesseract`
`conda install -c conda-forge/label/cf202003 pytesseract `

现在,当我尝试将简单的图像运行到 ocr 代码时,我收到以下错误

File "C:\Users\user\Anaconda3\lib\site-packages\pytesseract\pytesseract.py", line 232, in run_tesseract 提高TesseractNotFoundError()

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

【问题讨论】:

    标签: python python-tesseract


    【解决方案1】:

    您看到此错误是因为您的 PATH 中没有 tesseract 可执行文件。所以你必须包括以下行:

    pytesseract.pytesseract.tesseract_cmd = r'C:\\Program Files\\Tesseract-OCR\\tesseract.exe'
    

    你可以在pytesseract的Official documentation看到一个例子。

    我编写了 default tesseract 可执行文件夹,但如果您更改了它,请记住使用 <full_path_to_your_tesseract_executable>(如上一个链接中所建议的那样)。

    【讨论】:

    • 谢谢。我没有在路径之前使用 r
    • @DayanandaDowarah 很高兴能提供帮助!如果我的回答解决了您的问题,您可以通过单击我的回答左侧的“v”按钮将其选择为“已接受”。 :D
    猜你喜欢
    • 2019-05-28
    • 1970-01-01
    • 2022-10-16
    • 2019-12-05
    • 1970-01-01
    • 1970-01-01
    • 2016-05-23
    • 2015-09-04
    • 2018-05-30
    相关资源
    最近更新 更多