美文网首页
pycharm terminal 识别图片中的文字 报错:tes

pycharm terminal 识别图片中的文字 报错:tes

作者: 码农工号9527 | 来源:发表于2020-05-09 14:58 被阅读0次

在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 识别图片中的文字 报错:tes

      本文链接:https://www.haomeiwen.com/subject/rzsknhtx.html