【发布时间】:2020-02-28 10:35:56
【问题描述】:
当我尝试执行 OCR 程序时,我收到 Module not found error。
我正在将 Anaconda 与 Jupyter 笔记本一起使用。
我已经安装了 tesserocr 并在 conda 控制台中激活了它,但仍然遇到同样的错误。
import tesserocr
from PIL import Image
print (tesserocr.tesseract_version() ) # print tesseract-ocr version
print (tesserocr.get_languages() ) # prints tessdata path and list of available languages
image = Image.open('C:\\Users\\xxxxx\\Desktop\\CAR_APPLICATIONS\\2019-11-02_15-29-08.jpg')
print(image)
print (tesserocr.image_to_text(image) ) # print ocr text from image
错误:
ModuleNotFoundError Traceback(最近一次调用最后一次) 在 ----> 1 导入 tesserocr 2 从 PIL 导入图像 3 print (tesseract.tesseract_version() ) # 打印 tesseract-ocr 版本 4 print (tesserocr.get_languages() ) # 打印 tessdata 路径和可用语言列表 5
ModuleNotFoundError: 没有名为“tesserocr”的模块
【问题讨论】:
标签: python-3.x ocr tesseract python-tesseract