当前位置:   article > 正文

解决:pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it‘s not in your

pytesseract.pytesseract.tesseractnotfounderror: tesseract is not installed o

python3.7使用tesseract,已经安装了pytesseract,出现以上问题,先上问题截图

 报错原因很明确: 没有找到 tesseract

解决方案:

 1.找到python的安装路径下的pytesseract.py:   例如我的是   E:\anaconda3\Lib\site-packages\pytesseract

 

2.打开pytesseract.py文件,查找tesseract_cmd

将原来的   tesseract_cmd = 'tesseract' 改为:  tesseract_cmd = 'OCR的安装路径下的tessract.exe'

例如我的是   tesseract_cmd = 'E:\\Tesseract-OCR\\tesseract.exe' 

注意有的地方需要转义   例如 \\tesseract.exe,或者也可直接加r转义

3.重新运行程序即可

当然前提你得把tesseract-ocr-setup-4.00.00dev.exe装上python3。安装包:Index of /tesseract

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/菜鸟追梦旅行/article/detail/243082
推荐阅读
相关标签
  

闽ICP备14008679号