pytesseract是基于Python的OCR工具, 底层使用的是Google的Tesseract-OCR 引擎,支持识别图片中的文字,支持jpeg, png, gif, bmp, tiff等图片格式。

如何安装使用请看我的上一篇。

在使用pytesseract打开图片是遇到没有找到文件解决pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.

 解决办法:

1.添加环境变量 系统-属性-高级-环境变量

系统变量path添加tesseract的安装路径D:\Program Files\tesseract

2.系统变量增加一个TESSDATA_PREFIX变量名,变量值还是安装路径D:\Program Files\tesseract\tessdata这是语言字库文件夹

3.修改D:\python路径\Lib\site-packages\pytesseract\pytesseract.py文件

tesseract_cmd = r'D:\Program Files\tesseract\tesseract.exe'

然后就可以了

Python的OCR工具pytesseract解决TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information环境变量问题的更多相关文章

  1. 解决:pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it‘s not in your PATH. See README file for more information.

    问题:使用pytesseract库识别图片中文字时出现报错 代码: import pytesseract from PIL import Image,ImageEnhance img=Image.op ...

  2. pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your path && FileNotFoundError: [WinError 2] 系统找不到指定的文件。

    C:\Users\k\Desktop\test>python test.py Traceback (most recent call last): File , in run_tesseract ...

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

    使用pytesseract识别验证码中遇到异常如下: pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installe ...

  4. 解决pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your path问题

    解决方案: 找到python的安装路径下的pytesseract:   例如我的是  C:\develop\Python\Lib\site-packages\pytesseract .用文本编辑器打开 ...

  5. Python 进行 OCR识别 -- pytesseract库

    pip install pytesseract 报错:tesseract is not installed or it's not in your path 下载安装 Tesseract-OCR ht ...

  6. python中文ocr方案-pytesseract

    pytesseract是google维护的具有学习功能的OCR引擎,3.0以后支持中文识别. 安装: 1. 安装tesseract-ocr组件:记得同步下载简体中文与英文语言包. 2. 安装PIL,需 ...

  7. python基础系列教程——Python的安装与测试:python的IDE工具PyDev和pycharm,anaconda

    ---恢复内容开始--- python基础系列教程——Python的安装与测试:python的IDE工具PyDev和pycharm,anaconda 从头开启python的开发环境搭建.安装比较简单, ...

  8. Android开发之配置adb工具的环境变量

    在Android开发中,adb是一个非常好用也非常使用的工具,可是使用的时候假设没有改动环境变量,每一次都须要输入全然路径非常麻烦.解决的方法是在环境变量中加入adb工具的路径. Windows平台 ...

  9. python解释器的安装;python2与python3同时在环境变量中时的解决方案

    新文档 html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,addres ...

  10. VSCode的Python扩展下程序运行的几种方式与环境变量管理

    在VSCode中编写Python程序时,由于有些地方要使用环境变量,但是发现设置的环境变量有时不起作用,花了点时间研究了一下,过程不表,直接说结论. 首先,环境变量的设置,Python扩展中有三种方式 ...

随机推荐

  1. Gradio 5 稳定版正式发布

    在过去的几个月里,我们一直在努力工作,今天,我们想向大家展示成果:Gradio 5 稳定版现已发布. 有了 Gradio 5,开发者可以构建 生产级的机器学习 Web 应用,这些应用不仅性能优越.可扩 ...

  2. 【Azure Cloud Service】使用Key Vault Secret添加.CER证书到Cloud Service Extended Support中

    问题描述 因为Key Vault的证书上传功能中,只支持pfx格式的证书,而中间证书,根证书不能转换为pfx格式,只能是公钥证书格式 cet 或者 crt,能通过文本工具直接查看base64编码内容. ...

  3. KubeKey 2.1.0 发布:增强 K8s 离线交付体验

    2022 年 5 月 6 日,KubeKey 2.1.0 正式发布,这是 KubeKey 的第 8 个正式版本.该版本增强了离线部署能力和交付体验,同时支持"一云多芯",即同一个 ...

  4. [Apache Doris] Apache Doris 架构及代码目录解读

    一.系统架构 Doris是一个MPP的OLAP系统,主要整合了Google Mesa(数据模型),Apache Impala(MPP Query Engine)和Apache ORCFile (存储格 ...

  5. 20.Kubernetes可视化界面kubesphere

    Kubernetes可视化界面kubesphere 前言 Kubernetes也提供了默认的dashboard页面,但是功能不是很强大,这里就不使用了 而是采用Kubesphere大桶全部的devop ...

  6. linux bash shell 入门教程()

    Shell Script(bash)简介 众所皆知地,UNIX上以小工具著名,利用许多简单的小工具,来完成原本需要大量软体开发的工作,这一点特色,使得UNIX成为许多人心目中理想的系统平台. 在众多的 ...

  7. 关于 java.util.concurrent.RejectedExecutionException

    遇到java.util.concurrent.RejectedExecutionException 目前看来,最主要有2种原因. 第一: 你的线程池ThreadPoolExecutor 显示的shut ...

  8. Java 10大优点—Part4—Java内存模型

    本文由 ImportNew - 靳禹 翻译自 zeroturnaround.如需转载本文,请先参见文章末尾处的转载要求. 在忙着参加在爱沙尼亚进行的 TEDx talk 演讲活动以及在比利时举办的一届 ...

  9. python之pyecharts

    文档:https://pyecharts.org/ 安装: pip install pyecharts 示例: from pyecharts.charts import Bar from pyecha ...

  10. redis教程(Mac)

    1.首先,检查是否已经安装Homebrew,如果没有安装Homebrew,请先安装 2.使用Homebrew安装命令,在终端输入以下命令 brew install redis 当前默认安装5.0.8版 ...