1. 程式人生 > >mac下安裝tesserocr包的流程和錯誤(Failed building wheel for tesserocr)

mac下安裝tesserocr包的流程和錯誤(Failed building wheel for tesserocr)

按以下是步驟順序安裝:

brew install imagemagick

brew install tesseract

在命令列輸入tesseract即可驗證是否成功安裝tesseract

pip3 install tesserocr

如果最後一步出現Failed building wheel for tesserocr問題,在仔細看的話會發現是include  <cstdint>那裡出了問題。

解決方法就是找到/usr/local/Cellar/tesseract/3.05.02/include/tesseract目錄下的host.h檔案,將include <cstdint>改為include <stdint.h>即可執行最後一步。