欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

【已解决】Error opening data file ./chi_sim.traineddata Please make sure the TESSDATA_PREFIX environment

程序员文章站 2022-07-05 21:56:08
...

报错内容:

Error opening data file ./chi_sim.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to your “tessdata” directory.
Failed loading language ‘chi_sim’
Tesseract couldn’t load any languages!
Warning: Invalid resolution 0 dpi. Using 70 instead.

解决方法:

  1. 设置环境变量(先下载服务 brew install tesseract),我是设置了还不行
    export TESSDATA_PREFIX=/usr/local/Cellar/tesseract/4.1.1/share/tessdata
    
  2. 手动设置字库路径
    【已解决】Error opening data file ./chi_sim.traineddata Please make sure the TESSDATA_PREFIX environment
相关标签: tess4j图像识别