2017-04-08 215 views
0

我試過很多方法來安裝Tesseract,但我似乎無法得到它的工作。我在Mac上,這是我不斷收到的錯誤安裝tesseract Mac OS時發生錯誤

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解決這個問題?

+0

什麼是「圖像」?一個文件路徑?這是否存在? –

+0

或'pytesseract'試圖運行'tesseract'?你的問題從來沒有顯示安裝tesseract,那麼**錯誤是什麼? –

回答

0

Anaconda確實有conda Tesseract包可用。使用下面的命令安裝它並重試。

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

如果你需要最新vesrion Tesseract 4.00.00alpha,您可以參考github上的安裝說明。如果您沒有安裝XcodeHomebrew,請選擇this進行安裝。