centos环境下 pytesseract.image_to_string() 发生OSError: [Errno 2] No such file or directory

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zyy247796143/article/details/79980006
word = pytesseract.image_to_string(bw)
File "/usr/lib/python2.7/site-packages/pytesseract/pytesseract.py", line 193, in image_to_string
return run_and_get_output(image, 'txt', lang, config, nice)
File "/usr/lib/python2.7/site-packages/pytesseract/pytesseract.py", line 140, in run_and_get_output
run_tesseract(**kwargs)
File "/usr/lib/python2.7/site-packages/pytesseract/pytesseract.py", line 111, in run_tesseract
proc = subprocess.Popen(command, stderr=subprocess.PIPE)
File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory


经查询,centos环境下执行:yum install tesseract 

安装tesseract 即可。


猜你喜欢

转载自blog.csdn.net/zyy247796143/article/details/79980006