【问题标题】:tesseract does not worked although I installed it and add it to the Path尽管我安装了 tesseract 并将其添加到路径中,但它不起作用
【发布时间】:2019-10-04 05:07:48
【问题描述】:

我已经从这个page 安装了 tesseract 64 位。

我还将“C:\Program Files\Tesseract-OCR”添加到系统路径。我转到“系统属性”,然后是“高级”选项卡,然后单击“环境变量...”。然后我将“C:\Program Files\Tesseract-OCR”添加到用户和系统变量的路径中。 在命令提示符下,我输入“cd C:\Program Files\Tesseract-OCR”,然后输入“tesseract”,得到以下信息:

Usage:
  tesseract --help | --help-extra | --version
  tesseract --list-langs
  tesseract imagename outputbase [options...] [configfile...]

OCR options:
  -l LANG[+LANG]        Specify language(s) used for OCR.
NOTE: These options must occur before any configfile.

Single options:
  --help                Show this help message.
  --help-extra          Show extra help for advanced users.
  --version             Show version information.
  --list-langs          List available languages for tesseract engine.

但是,当我想在 anaconda python notebook 上使用它时,出现以下错误:

TesseractNotFoundError: tesseract is not installed or it's not in your path`enter code here`

【问题讨论】:

  • 你能指定你如何在windows系统变量中设置变量。
  • @JayVasant 我按照视频中的说明做了他所做的:youtube.com/watch?v=YM8j9dzuKsk
  • 我也面临同样的问题。试试这个 -> github.com/UB-Mannheim/tesseract/wiki
  • 当我在 Windows 上使用 pytesseract 时,我总是要告诉它可执行文件在哪里:pytesseract.pytesseract.tesseract_cmd = 'C:\\Program Files (x86)\\Tesseract-OCR\\tesseract.exe'

标签: python-3.x jupyter-notebook anaconda tesseract python-tesseract


【解决方案1】:

据我了解,您已成功在您的机器上安装了 tesseract。您只是无法在代码中使用它。
要在 Python 代码中使用机器上安装的 tesseract,您还应该考虑使用 pytesseract 包。您可以使用包管理器安装 pytesseract。
进一步阅读pytesseract

【讨论】:

  • 我已经安装了它:要求已经满足:pytesseract in c:\users\...\appdata\local\continuum\anaconda3\envs\tensorflow\lib\site-packages (0.3.0 )要求已经满足:c:\users\....\appdata\local\continuum\anaconda3\envs\tensorflow\lib\site-packages 中的枕头(来自 pytesseract)(5.3.0)
猜你喜欢
  • 2019-11-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-07-01
  • 2018-11-30
  • 2020-05-10
  • 2020-12-17
  • 1970-01-01
相关资源
最近更新 更多