使用pytesseract识别验证码中遇到异常如下:

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

安装Pillow,命令pip install Pillow,安装完毕会在Python文件夹下Lib\site-packages\pytesseract这个文件夹,里面有pytesseract.py文件

检查上述报错中的pytesseract.py源码,发现如下说明:

# CHANGE THIS IF TESSERACT IS NOT IN YOUR PATH, OR IS NAMED DIFFERENTLY

tesseract_cmd = 'tesseract'

从网上找到相应的‘Tesseract-OCR’下载安装(寻找对应版本):https://github.com/tesseract-ocr/tesseract/wiki

安装后的默认文件路径为(这里使用的是Windows版本):C:\Program Files (x86)\Tesseract-OCR\

然后将源码中的:

tesseract_cmd = 'tesseract'

更改为:

tesseract_cmd = r'C:\Program Files (x86)\Tesseract-OCR\tesseract.exe'

版权声明:本文为CSDN博主「大王大大王」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/wang_hugh/article/details/80760940

pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your path的更多相关文章

  1. 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 ...

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

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

  3. pytesseract.pytesseract.TesseractError: (1, 'Error opening data file /usr/local/share/tessdata/chi_sim.traineddata Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata"

    pytesseract.pytesseract.TesseractError: (1, 'Error opening data file /usr/local/share/tessdata/chi_s ...

  4. tesseract-ocr和tesseract.exe is not installed or it's not in your path问题解决

    一.解决方案: 1.http://www.ddooo.com/softdown/94968.htm   打开下载的压缩包,找到"tesseract-ocr-setup-3.02.02.exe ...

  5. 报错解决——pytesseract.pytesseract.TesseractError: (1,’Error opening data file /usr/local/share/tessdata/eng.traineddata’)

    解决方法:(原文地址http://stackoverflow.com/questions/14800730/tesseract-running-error) $ wget https://tesser ...

  6. Selenium&Pytesseract模拟登录+验证码识别

    验证码是爬虫需要解决的问题,因为很多网站的数据是需要登录成功后才可以获取的. 验证码识别,即图片识别,很多人都有误区,觉得这是爬虫方面的知识,其实是不对的. 验证码识别涉及到的知识:人工智能,模式识别 ...

  7. Selenium&Pytesseract模拟登录+验证码识别

    验证码是爬虫需要解决的问题,因为很多网站的数据是需要登录成功后才可以获取的. 验证码识别,即图片识别,很多人都有误区,觉得这是爬虫方面的知识,其实是不对的. 验证码识别涉及到的知识:人工智能,模式识别 ...

  8. Python中pytesseract库的使用以及注意事项

    当我们在使用pytesseract库的时候,使用 pip install pytesseract安装完成后,发现它并不能识别出图片内容,并且会抛出异常pytesseract.pytesseract.T ...

  9. tesseract安装及问题处理

    错误1 pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your p ...

随机推荐

  1. linux内核--wait_event_interruptible_timeout()函数分析(转)

    原文:https://blog.csdn.net/wuyongpeng0912/article/details/45723657 网上有关于此函数的分析,但大都是同一篇文章转载来转载去,没有进一步的分 ...

  2. 记vue nextTick用到的地方

    nextTick是vue提供的全局函数,在下次 DOM 更新循环结束之后执行延迟回调.在修改数据之后立即使用这个方法,获取更新后的 DOM. // 修改数据 vm.msg = 'Hello' // D ...

  3. rest framework 之解析器

    一.示例 1.api/urls.py from django.urls import path, re_path from api.views import UserView, ParserView ...

  4. ansible-playbook安装zabbix_server,agent监控

    主要完成通过playbook自动生成zabbix_server,agent,这里没有完全实现自动化,这里机器的获取还是需要人为手工填写,如果感兴趣想通过自动获取需要部署的机器可以通过namp扫描工具a ...

  5. Httpd服务入门知识-Httpd服务常见配置案例之定义路径别名

    Httpd服务入门知识-Httpd服务常见配置案例之定义路径别名 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任.   一.创建测试数据 [root@node101.yinzhengj ...

  6. Haproxy 反向代理

    一.haproxy介绍 HAProxy是一个使用C语言编写的自由及开放源代码软件,其提供高可用性.负载均衡,以及基于TCP和HTTP的应用程序代理. 特点如下: .支持两种代理模式:TCP(四层)和H ...

  7. scratch2.0的教材视频,王木头系列

    在线视频 http://v.qq.com/vplus/d05a62f676f6f3b6b87401b4530cff9a?page=cover 理论辩证 https://www.sohu.com/a/1 ...

  8. 34、使用Python操作MySql数据库和MsSql数据库

    一.数据库的安装和连接 1. PyMySQL的安装 pip install pymysql 2 .python连接数据库 import pymysql db = pymysql.connect(&qu ...

  9. 利用restassured实现http/https接口请求

    话不多说,直接上代码: package com.nuanshui.frms.test.utils.http; import io.restassured.response.Response; impo ...

  10. mySql 常用命令 | 珠峰培训例子

    show databases; use mhxy; select database(); show tables; desc account_list_175; ),(); select from_u ...