首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在python中导入tesseract时无法安装qhull

在python中导入tesseract时无法安装qhull
EN

Stack Overflow用户
提问于 2016-10-12 17:35:52
回答 2查看 2.6K关注 0票数 1

我想从以图像形式存储的一堆表格中提取数据-

在导入tesseract时,它会提示安装Qhull (根据documentation http://pytesseract.readthedocs.io/en/latest/tutorials.html)

代码-

代码语言:javascript
复制
> 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')

我得到以下提示,但我无法正确输入目录-

代码语言:javascript
复制
Please enter the path to an existing directory where qhull should be installed: 

我试着给目录加引号,也是通过一个变量,但它总是给我无效的目录错误

这应该是非常直截了当的,但我就是不明白。

提前谢谢。

EN

回答 2

Stack Overflow用户

发布于 2017-04-17 12:04:49

请改用pytesseract

代码语言:javascript
复制
pip install pytesseract
票数 0
EN

Stack Overflow用户

发布于 2017-08-10 17:52:08

代码语言:javascript
复制
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)
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39995285

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档