我已经下载了 PyTesser并解压缩了它。
我在
我在
pytesser_v0.0.1
文件夹中,并尝试在Python解释器中运行示例用法代码:from pytesser import *
print image_file_to_string('fnord.tif')
和输出:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pytesser.py", line 44, in image_file_to_string
call_tesseract(filename, scratch_text_name_root)
File "pytesser.py", line 21, in call_tesseract
proc = subprocess.Popen(args)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
注意:我在使用 Ubuntu 12.10
和 Python 2.7.3
有人能帮我理解这个错误吗?我该怎么做才能修复它?
fnord.tif
。请使用磁盘上的图像并相应更改代码。 - Paulo Almeidafnord.tif
已包含。 - Ghilas BELHADJcall_tesseract
中Popen
的参数。请使用apt-get install tesseract-ocr
进行安装。 - Paulo Almeida