pycharm terminal 识别图片中的文字 报错:tesseract is not installed or it's not in your path

在pycharm的terminal中执行如下py文件

# pytesseract_test.py

import pytesseract
from PIL import Image

image = Image.open('tesseracttest.jpg')
text = pytesseract.image_to_string(image)
print(text)

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

tesseract-ocr已经配置环境变量,在cmd下执行正常

解决:修改在pycharm的中tesseract的可执行文件路径
如下:


image1.png

附tesseract下载地址:https://digi.bib.uni-mannheim.de/tesseract/

你可能感兴趣的:(pycharm terminal 识别图片中的文字 报错:tesseract is not installed or it's not in your path)