0
我正在运行使用Tesseract的python测试框架。tesseract python系统找不到指定的文件
当我跑不过它使用的Tesseract一个测试,我得到以下错误:
WindowsError: [Error 2] The system cannot find the file specified
我设法去通过日志,发现它打破了在:
File "C:\Python27\lib\subprocess.py", line 212, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "C:\Python27\lib\subprocess.py", line 390, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 640, in _execute_child
startupinfo)
子进程由框架中的非python lib命令调用
def process_frame_text(single_char=False):
tess_list = ['tesseract', 'tmp/ocr_image.png', 'tmp/ocr_output']
tess_list += ['-psm', '10'] if single_char else []
check_output(tess_list, stderr=STDOUT)[:-1]
我在我的机器上安装了Windows Tesseract,位于C:\ Program Files x86 \ Tesseract-OCR
欣赏你的想法。
感谢
这就是问题所在,谢谢。我直接添加了路径。 – mogoli
它已经是一个环境变量TESSDATA_PREFIX:C:/ Program Files(x86)/Tesseract-OCR/tesseract.exe所以即将去调查为什么这不起作用 – mogoli
@ mogoli,检查我在编辑答案我的额外信息。你的'TESSDATA_PREFIX'设置不正确。 – thewaywewere