tesseract安装mac os

Ted*_*y13 5 macos terminal homebrew tesseract

我正在尝试使用homeBrew在我的mac上安装tesseract.当我尝试安装时,一切似乎都很好,但我收到以下错误/消息:

Warning: Could not link leptonica. Unlinking...
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using `brew link leptonica'
Run Code Online (Sandbox Code Playgroud)

当我尝试运行tesseract函数时,我收到以下错误:

Tesseract Open Source OCR Engine v3.02.02 with Leptonica
Error in pixReadStreamPng: function not present
Error in pixReadStream: png: no pix returned
Error in pixRead: pix not read
Unsupported image type.
Run Code Online (Sandbox Code Playgroud)

我安装了图像magick,我用来安装tesseract的命令是:

brew install tesseract
Run Code Online (Sandbox Code Playgroud)

任何人都可以告诉我,我可以做些什么让tesseract工作?谢谢!

编辑 当我运行brew链接leptonica时,我收到以下错误:

Could not symlink file: /usr/local/Cellar/leptonica/1.69/bin/yuvtest
Target /usr/local/bin/yuvtest already exists. You may need to delete it.
Run Code Online (Sandbox Code Playgroud)

jam*_*ell 5

现在,截至 2019 年 9 月,不再有任何可选安装标志可用

brew options tesseract
Run Code Online (Sandbox Code Playgroud)

什么也不产生。但,

brew info tesseract
Run Code Online (Sandbox Code Playgroud)

产生以下关键信息:

This formula contains only the "eng", "osd", and "snum" language data files.
If you need all the other supported languages, `brew install tesseract-lang`.
Run Code Online (Sandbox Code Playgroud)

因此,要安装所有语言,您现在需要安装一个名为 的单独库tesseract-lang

更新安装:

brew install tesseract
brew install tesseract-lang
Run Code Online (Sandbox Code Playgroud)

希望这可以帮助。

旧的,以防万一这有用:

现在,截至 2019 年 1 月,只要您先安装了 xquartz,Tesseract 就可以通过自制程序正常安装brew cask install xquartz。然后您可以执行以下操作:brew install tesseract --with-all-languages --with-serial-num-pack --with-training-tools


Mon*_*021 1

听起来有点傻,但是你尝试过删除 yuvtest 吗?我刚刚自己尝试过 - 该文件是由brew link leptonica自动生成的。至于为什么它不起作用,您是否可能之前安装了某个版本的leptonica/tesseract?对修复的另一个合理猜测是

brew uninstall tesseract; brew install tesseract
Run Code Online (Sandbox Code Playgroud)

据我所知,安装的图像魔法对于超立方体来说应该不重要。他们没有任何共同点。