推荐学习书目
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
songdg
V2EX  ›  Python

anaconda3 上安装的 pytesseract 不能用,是没正确安装还是其他问题。

  •  
  •   songdg · Sep 6, 2018 · 4422 views
    This topic created in 2808 days ago, the information mentioned may be changed or developed.
    pytesseract.image_to_string(image)
    Traceback (most recent call last):

    File "<ipython-input-14-e63aa9f2dc4e>", line 1, in <module>
    pytesseract.image_to_string(image)

    File "C:\ProgramData\Anaconda3\lib\site-packages\pytesseract\pytesseract.py", line 294, in image_to_string
    return run_and_get_output(*args)

    File "C:\ProgramData\Anaconda3\lib\site-packages\pytesseract\pytesseract.py", line 202, in run_and_get_output
    run_tesseract(**kwargs)

    File "C:\ProgramData\Anaconda3\lib\site-packages\pytesseract\pytesseract.py", line 172, in run_tesseract
    raise TesseractNotFoundError()

    TesseractNotFoundError: tesseract is not installed or it's not in your path

    Help on package pytesseract:

    NAME
    pytesseract

    PACKAGE CONTENTS
    pytesseract

    FILE
    c:\programdata\anaconda3\lib\site-packages\pytesseract\__init__.py
    6 replies    2018-09-07 17:21:41 +08:00
    nyanyh
        1
    nyanyh  
       Sep 6, 2018
    pytesseract 只是 Python 接口,还要单独装 tesseract 并加入 PATH 环境变量才可以
    jy02201949
        2
    jy02201949  
       Sep 6, 2018
    直接用 tesseract 吧
    beforeuwait
        3
    beforeuwait  
       Sep 6, 2018
    你 pip 了后
    机器还要安装一个啊
    在 debian 下
    apt-get install tesseract
    beforeuwait
        4
    beforeuwait  
       Sep 6, 2018
    1 楼说的没错
    songdg
        5
    songdg  
    OP
       Sep 7, 2018
    谢谢各位,现在可以运行了,但是不能识别中文,可是 Tesseract-OCR 已经装了中文( tessdata 文件夹了已经有 chi_sim.traineddata )。
    songdg
        6
    songdg  
    OP
       Sep 7, 2018
    加了 lang='chi_sim'就能识别中文了,不知道还有没有其他参数识别图片上某一个地方的。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   927 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 55ms · UTC 20:02 · PVG 04:02 · LAX 13:02 · JFK 16:02
    ♥ Do have faith in what you're doing.