无法在Mac上安装tesserocr

时间:2019-03-21 07:00:21

标签: python django macos ocr tesseract

我正在尝试使用以下命令安装tesserocr:

pip install tesserocr

但我遇到此错误:

tesserocr.cpp:298:10: fatal error: 'utility' file not found

    #include <utility>
             ^~~~~~~~~
    1 warning and 1 error generated.
    error: command '/usr/bin/clang' failed with exit status 1

我已使用brew install tesseract

安装了tesseract

我正在使用Mojave 10.14.3。

1 个答案:

答案 0 :(得分:0)

尝试以下方法:CC=clang XCC=clang++ CPPFLAGS="-stdlib=libc++ -DUSE_STD_NAMESPACE -mmacosx-version-min=10.8" pip install tesserocr。对我来说很好。

这个原始答案来自https://github.com/sirfz/tesserocr/issues/177

祝你好运!