【发布时间】:2017-07-23 07:10:38
【问题描述】:
我已经安装了 Pytesser 来从图像中提取文本
from PIL import Image
from pytesser import *
print image_to_string
以上命令正在运行 但是当我输入代码时
from pytesser import *
from PIL import Image
image = Image.open('C:/Users/Anmol/Desktop/PYTHON/text_image.jpg')
image_to_string(image)
我得到错误:
**
Traceback(最近一次调用最后一次):文件 “C:\Users\Anmol\Desktop\PYTHON\text_image.py”,第 23 行,在 image_to_string(image) 文件“C:\Python27\lib\site-packages\pytesser.py”,第 31 行,在 image_to_string call_tesseract(scratch_image_name, scratch_text_name_root) 文件“C:\Python27\lib\site-packages\pytesser.py”,第 21 行,在 call_tesseract proc = subprocess.Popen(args) 文件“C:\Python27\lib\subprocess.py”,第 390 行,在 init errread, errwrite) 文件“C:\Python27\lib\subprocess.py”,第 640 行,在 _execute_child 中 startupinfo) WindowsError: [错误 2] 系统找不到指定的文件**
请指导我,因为我是 Python 新手。
【问题讨论】:
标签: python image python-2.7 pytesser