from PIL import Image
import pytesseract
text = pytesseract.image_to_string(Image.open('denggao.jpeg'),lang='chi_sim')
print(text)
运行后发现了这些如下问题,一直无法解决
Traceback (most recent call last):
File "C:/Python27/Lib/site-packages/pytesser_v0.0.1/ccc.py", line 68, in <module>
text = pytesseract.image_to_string(Image.open('denggao.jpeg'),lang='chi_sim')
File "C:\Python27\lib\site-packages\pytesseract\pytesseract.py", line 193, in image_to_string
return run_and_get_output(image, 'txt', lang, config, nice)
File "C:\Python27\lib\site-packages\pytesseract\pytesseract.py", line 140, in run_and_get_output
run_tesseract(**kwargs)
File "C:\Python27\lib\site-packages\pytesseract\pytesseract.py", line 111, in run_tesseract
proc = subprocess.Popen(command, stderr=subprocess.PIPE)
File "C:\Python27\lib\subprocess.py", line 711, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 959, in _execute_child
startupinfo)
WindowsError: [Error 5]
这算一个坑吗。。。
你可以考虑升一下级,用新的版本试试