请教一下如何正确地安装 tesserocr - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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 2018-03-14 20:00:22 +08:00 9550 次点击
    这是一个创建于 2771 天前的主题,其中的信息可能已经有所发展或是发生改变。

    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 上有人提出了同样的问题,但仍没有回答。

    第 1 条附言    2018-03-18 10:03:31 +08:00
    最后直接用 Anaconda 重装 python,使用 conda install -c simonflueckiger tesserocr 解决了
    5 条回复    2018-09-28 15:39:53 +08:00
    ZoomQuiet
        1
    ZoomQuiet  
       2018-03-15 07:21:46 +08:00 via iPhone
    是也乎 ()

    一般 windows 的问题…
    可用安装虚拟机…
    到 Linux 环境中自然解决…
    Gakho
        2
    Gakho  
       2018-03-16 13:35:33 +08:00
    我当时也是这样,好像后面是找了 exe 还是 msi 来安装的,因为之前还有一个 cxOracle 也是在 WIndows 下有这种问题
    hixiaoyin
        3
    hixiaoyin  
       2018-06-06 18:34:45 +08:00
    楼主,按你的方法解决了
    但现在有个问题:我用 2018 版的 pycharm,它自带 venv,因此产生了隔离的 python 环境
    Anaconda 的那些库是装在系统 python 中的,有没有什么办法可以让 pycharm 产生的隔离环境也能用 tesserocr 呢?
    Cheney1911
        4
    Cheney1911  
       2018-06-16 21:26:04 +08:00
    按楼主的方式解决了,但是不知道是什么原因
    helloworld1204
        5
    helloworld1204  
       2018-09-28 15:39:53 +08:00
    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:
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     947 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 31ms UTC 19:36 PVG 03:36 LAX 12:36 JFK 15:36
    Do have faith in what you're doing.
    ubao snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86