MacOS通过homebrew安装tesseract识别中文

本文指导如何使用Homebrew安装Tesseract OCR,包括brew update、brew install,以及下载并配置中文数据chi_sim.traineddata的过程。详述了查询安装路径和正确放置数据集的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

步骤:

brew update
brew install tesseract
pip install pytesseract

去往https://github.com/tesseract-ocr/tessdata下载中文数据集chi_sim.traineddata,把它放到这目录下:

 如果你用homebrew安装tesseract后的路径不在上面图片位置,请用以下命令查询安装路径:

查看所有安装的列表:
brew list
查看具体软件位置,比如tesseract:
brew list tesseract   
/opt/homebrew/Cellar/tesseract/4.1.3/bin/tesseract
/opt/homebrew/Cellar/tesseract/4.1.3/include/tesseract/ (19 files)
/opt/homebrew/Cellar/tesseract/4.1.3/lib/libtesseract.4.dylib
/opt/homebrew/Cellar/tesseract/4.1.3/lib/pkgconfig/tesseract.pc
/opt/homebrew/Cellar/tesseract/4.1.3/lib/ (2 other files)
/opt/homebrew/Cellar/tesseract/4.1.3/share/tessdata/ (36 files)

所以brew安装的软件在/opt/homebrew/Cellar/目录下面。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

爱编程的Mark

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值