【问题标题】:Error installing tesseract Mac OS安装 tesseract Mac OS 时出错
【发布时间】:2017-04-08 20:56:29
【问题描述】:

我尝试了多种方法来安装 Tesseract,但我似乎无法让它工作。我在 Mac 上,这是我不断收到的错误

    txt = pytesseract.image_to_string(image, lang='eng')
  File "/Users/user/anaconda/lib/python2.7/site-packages/pytesseract/pytesseract.py", line 161, in image_to_string
    config=config)
  File "/Users/user/anaconda/lib/python2.7/site-packages/pytesseract/pytesseract.py", line 94, in run_tesseract
    stderr=subprocess.PIPE)
  File "/Users/user/anaconda/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/Users/user/anaconda/lib/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

有谁知道我可以如何使用 tesseract 解决这个问题?

【问题讨论】:

  • 什么是image?文件路径?存在吗?
  • pytesseract 正在尝试运行tesseract?您的问题从未显示安装 tesseract,那么 那个 错误是什么?

标签: python macos tesseract python-tesseract


【解决方案1】:

Anaconda 确实有 conda Tesseract 包可用。使用以下命令安装并重试。

conda install -c brown-data-science tesseract=3.05.00

如果您需要最新版本Tesseract 4.00.00alpha,您可以参考安装说明中的github。如果您没有安装XcodeHomebrew,请检查this 进行安装。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-01-01
    • 2021-11-12
    • 2014-12-03
    • 2018-09-22
    • 1970-01-01
    • 2018-11-26
    • 2017-09-10
    相关资源
    最近更新 更多