V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
lusuon
V2EX  ›  Python

请教一下如何正确地安装 tesserocr

  •  1
     
  •   lusuon · Mar 14, 2018 · 9981 views
    This topic created in 2973 days ago, the information mentioned may be changed or developed.

    win10,直接使用 pip install tesserocr 的命令,输出如下:

    tesserocr.cpp(596): fatal error C1083: 无法打开包括文件: “ leptonica/allheaders.h ”: No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2

    似乎是 leptonica 库的问题,现在我已经从源码编译出了 dll,那么接下来该怎么办? StackOverflow 上有人提出了同样的问题,但仍没有回答。

    Supplement 1  ·  Mar 18, 2018
    最后直接用 Anaconda 重装 python,使用 conda install -c simonflueckiger tesserocr 解决了
    5 replies    2018-09-28 15:39:53 +08:00
    ZoomQuiet
        1
    ZoomQuiet  
       Mar 15, 2018 via iPhone
    是也乎 ╮(╯▽╰)╭

    一般 windows 的问题…
    可用安装虚拟机…
    到 Linux 环境中自然解决…
    Gakho
        2
    Gakho  
       Mar 16, 2018
    我当时也是这样,好像后面是找了 exe 还是 msi 来安装的,因为之前还有一个 cxOracle 也是在 WIndows 下有这种问题
    hixiaoyin
        3
    hixiaoyin  
       Jun 6, 2018
    楼主,按你的方法解决了
    但现在有个问题:我用 2018 版的 pycharm,它自带 venv,因此产生了隔离的 python 环境
    Anaconda 的那些库是装在系统 python 中的,有没有什么办法可以让 pycharm 产生的隔离环境也能用 tesserocr 呢?
    Cheney1911
        4
    Cheney1911  
       Jun 16, 2018
    按楼主的方式解决了,但是不知道是什么原因
    helloworld1204
        5
    helloworld1204  
       Sep 28, 2018
    Windows
    The proposed downloads consist of stand-alone packages containing all the Windows libraries needed for execution. This means that no additional installation of tesseract is required on your system.

    Conda
    You can use the channel simonflueckiger to install from Conda:

    > conda install -c simonflueckiger tesserocr
    or to get tesserocr compiled with tesseract 4.0.0:

    > conda install -c simonflueckiger/label/tesseract-4.0.0-master tesserocr
    pip
    Download the wheel file corresponding to your Windows platform and Python installation from simonflueckiger/tesserocr-windows_build/releases and install them via:

    > pip install <package_name>.whl
    Usage
    Initialize and re-use the tesseract API instance to score multiple images:
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2686 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 02:14 · PVG 10:14 · LAX 19:14 · JFK 22:14
    ♥ Do have faith in what you're doing.