我正在尝试使用Tesseract从图像中提取文本。这是我的代码。我使用pip install pytesseract安装,我还检查了site-package下的pytesseract.py。但是当我运行下面的代码时,我得到了下面的错误消息'WindowsError: [Error 2] The system cannot find the file specified'.
有什么想法吗?谢谢
from PIL import Image
import pytesseract
#pytesseract.pytesseract.tesseract.cmd = 'C:/Program Files (x86)/Tesseract-OCR/tesseract.exe'
im = Image.open('C:/Users/daizhang/Desktop/issue.PNG')
text = pytesseract.image_to_string (im)
print (text)发布于 2017-11-12 18:15:42
我理解错误中没有足够的信息。但是你需要安装Tesseract-OCR
还要确保系统路径中的安装目录。
https://stackoverflow.com/questions/46923997
复制相似问题