报错:pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your path

安装好tesseract后,在cmd可以运行。如下
在这里插入图片描述

之后在pycharm中运行时,出现报错:
pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your path

解决方法:在pytesseract.py中,将tesseract_cmd = 'tesseract'
改为tesseract_cmd = r'C:\Program Files (x86)\Tesseract-OCR\tesseract.exe'

pytesseract.py会在错误提示中,直接点击进入文件,然后查找cmd就能找到。

之后运行即可。

猜你喜欢

转载自blog.csdn.net/weixin_38648232/article/details/85161815