TesseractNotFoundError 使用 Anaconda/Jupyter

TesseractNotFoundError Using Anaconda/Jupyter

我已经安装了 Anaconda 2018.12(Python 3.7 版本)。我正在尝试测试 pytesseract 模块,但我一直遇到:

TesseractNotFoundError: C:\Program Files (x86)\Tesseract-OCR\tesseract.exe 未安装或不在您的路径中

我完成了:

我已经搜索了 tesseract.exe 文件,但在系统的任何地方都找不到它,所以我很难理解如何将模块 reference/import 放入 jupyter notebook 中(如果它已被使用)进入蟒蛇?

我尝试 运行 的代码是:

from PIL import Image 
import pytesseract
#pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files (x86)\Tesseract-OCR\tesseract.exe"

text = pytesseract.image_to_string(Image.open('C:\Temp\IMG_1519.jpg'))

print(text)

我希望这是简单的用户错误,但如能提供任何帮助,我们将不胜感激。非常感谢,本

引自 PyPi 页面:

Python-tesseract is a wrapper for Google’s Tesseract-OCR Engine.

和(根据先决条件):

Install Google Tesseract OCR (additional info how to install the engine on Linux, Mac OSX and Windows)

这意味着,pytesseract 不是一个独立的模块。它是使用 Google’s Tesseract-OCR Engine 的 python 包装器,您需要单独安装