步骤1: 安装Tesseract
如果要使用Tesseract库,首先需要安装它到你的机器上。
针对macOS用户,我们使用Homebrew 去安装Tesseract:
brew install tesseract
注意:
这里安装都是国外的网,建议更换下镜像源加速下载速度
# 替换brew.git:
$ cd "$(brew --repo)"
# 清华大学:
$ git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
# 替换homebrew-core.git:
$ cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
# 清华大学:
$ git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
# 替换homebrew-bottles:
# 清华大学:
$ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.bash_profile
$ source ~/.bash_profile
# 应用生效:
$ brew update
全过程下来,绝对会有一些错误出现的,现在将我遇到的错误总结如下:
错误汇总:
错误1:
==> Downloading https://storage.googleapis.com/downloads.webmpr

本文详细介绍了在MacOS环境下如何通过Homebrew安装Tesseract OCR,并提供了加速下载、解决常见安装错误的方法,包括更换镜像源、修改资源下载链接及SHA256校验值等步骤。
最低0.47元/天 解锁文章
4224

被折叠的 条评论
为什么被折叠?



