pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your path
使用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的更多相关文章
- 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 ...
- 解决pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your path问题
解决方案: 找到python的安装路径下的pytesseract: 例如我的是 C:\develop\Python\Lib\site-packages\pytesseract .用文本编辑器打开 ...
- 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 ...
- 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 ...
- 报错解决——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 ...
- Selenium&Pytesseract模拟登录+验证码识别
验证码是爬虫需要解决的问题,因为很多网站的数据是需要登录成功后才可以获取的. 验证码识别,即图片识别,很多人都有误区,觉得这是爬虫方面的知识,其实是不对的. 验证码识别涉及到的知识:人工智能,模式识别 ...
- Selenium&Pytesseract模拟登录+验证码识别
验证码是爬虫需要解决的问题,因为很多网站的数据是需要登录成功后才可以获取的. 验证码识别,即图片识别,很多人都有误区,觉得这是爬虫方面的知识,其实是不对的. 验证码识别涉及到的知识:人工智能,模式识别 ...
- Python中pytesseract库的使用以及注意事项
当我们在使用pytesseract库的时候,使用 pip install pytesseract安装完成后,发现它并不能识别出图片内容,并且会抛出异常pytesseract.pytesseract.T ...
- tesseract安装及问题处理
错误1 pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your p ...
随机推荐
- cobbler部署错误总结
web 报错500 Internal Server Error解决方案 在安装使用Cobbler web界面的时候提示HTTP 500错误,也就是服务器内部错误,检查防火墙和selinux都是为关闭状 ...
- Pytorch autograd,backward详解
平常都是无脑使用backward,每次看到别人的代码里使用诸如autograd.grad这种方法的时候就有点抵触,今天花了点时间了解了一下原理,写下笔记以供以后参考.以下笔记基于Pytorch1.0 ...
- docker学习8-搭建nginx环境
前言 使用 docker 搭建 nginx 环境 下载镜像 使用docker pull 拉取最新的 nginx 镜像 [root@yoyo ~]# docker pull nginx Using de ...
- httprunner学习17-linux上安装httprunner环境
前言 如果你是在linux上安装httprunner环境,用的是python3的环境,安装成功后会发现hrun命令找不到,需添加软链接. 环境准备: centos 7.6 python 3.6 htt ...
- 云打印 对 追光的人 的Beta产品测试报告
云打印 对追光的人的Beta产品测试报告 课程名称:软件工程1916|W(福州大学) 团队名称: 云打印 作业要求: 项目Beta冲刺(团队) 作业目标:作业集合 团队队员 队员学号 队员姓名 个人博 ...
- beta冲刺(3/7)
作业格式 课程名称:软件工程1916|W(福州大学) 作业要求:项目beta冲刺(团队) 团队名称: 那周余嘉熊掌将得队 作业目标:beta(3/7) 队员学号 队员姓名 博客地址 备注 221600 ...
- oracle数据库(五)
PL/SQL基础 PL/SQL语言是对oracle数据库语言的扩展,是一种高性能的基于处理事务的语言,能运行在任何oracle环境中,支持所有数据处理命令,支持所有SQL数据类型和函数,支持所有ora ...
- swift修饰符
Declaration Modifiers Declaration modifiers are keywords or context-sensitive keywords that modify t ...
- 无向图边双联通分量 tarjan 模板
#include <bits/stdc++.h> using namespace std; const int MAXN = 100005; const int MAXM = 500005 ...
- PinPoint使用教程
选择该应用的展示边界 InBound:3 OutBound:3 基本概念 APM (Application Performance Management/应用性能管理)工具 为大规模分布式系统. 开发 ...