Strava

mac pytesseract使用“chi_sim”时报错

1.具体报错

pytesseract.pytesseract.TesseractError: (1, 'Error opening data file /usr/local/share/tessdata/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! Could not initialize tesseract.')

 

2.原因

环境变量失效或者没设置

 

3.解决方式

export TESSDATA_PREFIX=/usr/local/Cellar/tesseract/4.1.1/share/tessdata #注意匹配自己的版本号

 

posted @ 2020-10-29 10:52  cheflone  阅读(1372)  评论(0编辑  收藏  举报