安装tesseract Mac OS时出错

时间:2017-04-08 20:56:30

标签: python macos tesseract python-tesseract

我已尝试过多种方法来安装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解决这个问题?

1 个答案:

答案 0 :(得分:0)

Anaconda确实有conda Tesseract套餐。使用以下命令安装它,然后重试。

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

如果您需要最新的版本Tesseract 4.00.00alpha,请参阅安装说明中的github。如果您未安装XcodeHomebrew,请选中this进行安装。