python 在centos 装tesseract-ocr 遇到的问题

shenjianlin@iz2zeewrvu7b7gkl4l7xv1z ~]$ cd ./Oppo/
[shenjianlin@iz2zeewrvu7b7gkl4l7xv1z Oppo]$ python oppo.py 
Traceback (most recent call last):
  File "oppo.py", line 674, in <module>
    oppo.login_in()
  File "oppo.py", line 46, in login_in
    Form_data = {'name': '1000002573', 'passwd': 'pairuioppo8', 'captcha': self.captcha(response.content)}
  File "oppo.py", line 31, in captcha
    text = pytesseract.image_to_string(image)
  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 116, in run_tesseract
    raise TesseractError(status_code, get_errors(error_string))
pytesseract.pytesseract.TesseractError: (1, u'Tesseract Open Source OCR Engine v3.04.00 with Leptonica Error opening data file /usr/local/share/tessdata/eng.traineddata Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "tessdata" directory. Failed loading language \'eng\' Tesseract couldn\'t load any languages! Could not initialize tesseract.')

阅读 3.8k
1 个回答
新手上路,请多包涵

哥们你这个问题解决没

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