python-3.x - 尽管我安装了 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`
解决方案
据我了解,您已在您的机器上成功安装了 tesseract。您只是无法在代码中使用它。
要在 Python 代码中使用机器上安装的 tesseract,您还应该考虑使用pytesseract包。您可以使用包管理器安装 pytesseract。
进一步阅读pytesseract
推荐阅读
- python-2.7 - Python 仅输出文件 b 中未找到的行
- batch-file - 如何处理文本文件的每一行并对每一行做一些事情
- php - 如何在 Laravel 项目中通过搜索获取参数填写搜索表单?
- javascript - 无法使用静态方法返回的类实例访问类方法
- ionic-framework - 在ionic 4中的代码中获取选项卡信息
- django - 当我更新任何字段时,我的用户模型在管理面板中将“电子邮件”更改为用户名
- c# - 如何选择 Distinct char 数据类型并通过使用 sql 强制转换为 int
- c++ - 如何获得类型是否真正可移动构造
- javascript - 如何将值从反应组件返回到调用模块?
- angular - 如何在 FormArray 中添加 Angular Material 自动完成