首页 > 解决方案 > 尽管我安装了 tesseract 并将其添加到路径中,但它不起作用

问题描述

我已经从这个页面安装了 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`

标签: python-3.xjupyter-notebookanacondatesseractpython-tesseract

解决方案


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


推荐阅读