如何在python中添加tesseract库

1,报错如下

如何在python中添加tesseract库

2,参考这篇博文https://www.jb51.net/article/183990.htm

 

如何在python中添加tesseract库

如何在python中添加tesseract库

 

but,它又报错了

pytesseract.pytesseract.TesseractError: (1, 'Error opening data file \\Program Files (x86)\\Tesseract-OCR\\chi_tra.traineddata Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory. Failed loading language \'chi_tra\' Tesseract couldn\'t load any languages! Could not initialize tesseract.')

 

如何在python中添加tesseract库

解决方法:

网上说是环境变量的问题:

于是乎,我再检查了一下,发现没有问题

如何在python中添加tesseract库

再试了一下,还是不行,打算重启电脑试试,,,,,,,希望可以叭,不说了,先去重启一下-------敬请等待。

 

好了好了,重启大法还是优秀!!!!!