Не удается установить qhull при импорте tesseract в python
Я хочу извлечь данные из группы таблиц, хранящихся в виде изображений -
При импорте tesseract он запрашивает установку Qhull (согласно документации http://pytesseract.readthedocs.io/en/latest/tutorials.html).
Код -
> import Image
> from tesseract import image_to_string
> print image_to_string(Image.open('test.png')) print
> image_to_string(Image.open('test-english.jpg'), lang='eng')
Я получаю следующий запрос, но не могу правильно ввести каталог -
Please enter the path to an existing directory where qhull should be installed:
Я попытался дать каталог в кавычках, также через переменные, но он продолжает давать мне неверную ошибку каталога
Это должно быть довольно просто, но я просто не понимаю.
Заранее спасибо.
2 ответа
You Need to change some lines of codes in
C:\Python27\Lib\site-packages\tesseract\voro.py file
in line after
# Qhull installation
if config_parser.has_option('qhull','install-dir'):
_qhulldir = config_parser.get('qhull','install-dir').strip()
else:
# Ask user for qhull directory
## qstr = 'Please enter the path to an existing directory where qhull should be installed:
qstr = 'C:/Python27/Lib/site-packages/tesseract'
## _qhulldir = os.path.expanduser(raw_input(qstr).strip())
_qhulldir = os.path.expanduser(qstr)