python 识别图片问题

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] 

这算一个坑吗。。。

阅读 2.1k
2 个回答

你可以考虑升一下级,用新的版本试试

先把后面的lang参数去掉看看还报不报错,报错是不是还是一样的

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题