【问题标题】:pytesseract.TesseractError: (-5, 'dyld: Library not loaded: Reason: image not found)pytesseract.TesseractError: (-5, 'dyld: Library not loaded: Reason: image not found)
【发布时间】:2015-04-30 14:56:57
【问题描述】:

在 Pytesseract 中使用 image_to_string() 函数时,出现以下错误:

File "/Library/Python/2.7/site-packages/pytesseract/pytesseract.py", line 164, in image_to_string
raise TesseractError(status, errors)
pytesseract.pytesseract.TesseractError: (-5, 'dyld: Library not loaded: /usr/local/lib/liblept.4.dylib\n  
Referenced from: /usr/local/bin/tesseract\n  Reason: image not found')

尝试重新安装 Tesseract(查看 Brew)、PyTesseract、PIL,但没有成功。 在我测试的其他机器上没有问题,都是 OSX Yosemite 10.10.3。

难倒。

【问题讨论】:

  • 如果你先brew update && brew upgrade,然后brew install tesseract,会发生什么?
  • 真该死,解决了这个问题。谢谢特里斯坦。
  • 我会为以后的提问者发布答案。如果您必须采取其他措施来解决问题,请接受或添加详细信息。

标签: python python-2.7 tesseract python-tesseract


【解决方案1】:

dylddynamic linker 修饰符——它或多或少有助于查找库。您应该能够通过重新安装找到 liblept (leptonia): brew update && brew upgrade && brew install tesseract

或者,您可以找到它正在搜索的库,然后将其复制到其路径中或创建一个链接。

【讨论】:

    猜你喜欢
    • 2015-02-12
    • 1970-01-01
    • 2017-05-29
    • 1970-01-01
    • 2023-03-04
    • 2022-12-18
    • 1970-01-01
    • 1970-01-01
    • 2018-07-27
    相关资源
    最近更新 更多