如何使用python从扫描的文档中提取文本

2024-06-16 13:45:52 发布

您现在位置:Python中文网/ 问答频道 /正文

我试过这个例子,https://github.com/madmaze/pytesseract

import Image
import pytesseract

print pytesseract.image_to_string(Image.open('image1.png'))

获取错误: 文件“/usr/lib/python2.7/子流程.py“,第1327行,在_execute_child raise child_exception OSError:[Errno 2]没有这样的文件或目录

有没有其他方法可以从扫描的文档中提取文本?在


Tags: 文件tohttpsimageimportgithubcomchild