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 "C:\Users\k\Anaconda3\lib\site-packages\pytesseract\pytesseract.py", line , in run_tesseract
proc = subprocess.Popen(cmd_args, **subprocess_args())
File "C:\Users\k\Anaconda3\lib\subprocess.py", line , in __init__
restore_signals, start_new_session)
File "C:\Users\k\Anaconda3\lib\subprocess.py", line , in _execute_child
startupinfo)
FileNotFoundError: [WinError ] 系统找不到指定的文件。 During handling of the above exception, another exception occurred: Traceback (most recent call last):
File "test.py", line , in <module>
text=pytesseract.image_to_string(Image.open('xxx.png'),lang='chi_sim')
File "C:\Users\k\Anaconda3\lib\site-packages\pytesseract\pytesseract.py", line , in image_to_string
}[output_type]()
File "C:\Users\k\Anaconda3\lib\site-packages\pytesseract\pytesseract.py", line , in <lambda>
Output.STRING: lambda: run_and_get_output(*args),
File "C:\Users\k\Anaconda3\lib\site-packages\pytesseract\pytesseract.py", line , in run_and_get_output
run_tesseract(**kwargs)
File "C:\Users\k\Anaconda3\lib\site-packages\pytesseract\pytesseract.py", line , in run_tesseract
raise TesseractNotFoundError()
pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your path
安装软件tesseract
下载地址:https://digi.bib.uni-mannheim.de/tesseract/
再次运行可能会出现下面的问题
C:\Users\k\Desktop\test>python test.py
Traceback (most recent call last):
File "test.py", line , in <module>
text=pytesseract.image_to_string(Image.open('xxx.png'),lang='chi_sim')
File "C:\Users\k\Anaconda3\lib\site-packages\pytesseract\pytesseract.py", line , in image_to_string
}[output_type]()
File "C:\Users\k\Anaconda3\lib\site-packages\pytesseract\pytesseract.py", line , in <lambda>
Output.STRING: lambda: run_and_get_output(*args),
File "C:\Users\k\Anaconda3\lib\site-packages\pytesseract\pytesseract.py", line , in run_and_get_output
run_tesseract(**kwargs)
File "C:\Users\k\Anaconda3\lib\site-packages\pytesseract\pytesseract.py", line , in run_tesseract
raise TesseractError(status_code, get_errors(error_string))
pytesseract.pytesseract.TesseractError: (, 'Error opening data file \\Program Files (x86)\\Tesseract-OCR\\tessdata/chi_sim.traineddata Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "tessdata" directory. Failed loading language \'chi_sim\' Tesseract couldn\'t load any languages! Could not initialize tesseract.')
解决方法:
https://www.cnblogs.com/sea-stream/p/10961580.html
pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your path && FileNotFoundError: [WinError 2] 系统找不到指定的文件。的更多相关文章
- pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your path
使用pytesseract识别验证码中遇到异常如下: pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installe ...
- 解决pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your path问题
解决方案: 找到python的安装路径下的pytesseract: 例如我的是 C:\develop\Python\Lib\site-packages\pytesseract .用文本编辑器打开 ...
- Apache:系统找不到指定的文件: No installed ConfigArgs for the service "Apache2"
解决方法: 将以下内容保存成FixApacheError.reg文件(其中红色粗体Apache2改成报错的系统服务名称,如"RTX_HTTPServer"),导入系统注册表 Fix ...
- 系统找不到指定文件 No installed service name 'Apache2'
原因:系统服务中没有apache2服务 解决方法: 开始 --运行 --- 输入“CMD”出来DOS窗口---- 输入 D: 回车 再输入 cd D:/Program Files(x86)/Apach ...
- 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 ...
- tesseract-ocr,tesseract,pytesseract在windows下怎么安装
废话不多说,直接介绍如何下载安装tesseract-OCR以及pytesseract和PIL资源 文末百度网盘都有Tesseract是一个开源的OCR引擎,能识别100多种语言(中,英,韩,日,德,法 ...
- pytesseract使用
1.安装pip install pytesseract 2.安装tesseract-ocr,下载地址:https://github.com/UB-Mannheim/tesseract/wiki,我安装 ...
随机推荐
- (三十)JSP标签之自定义标签
创建一个类,引入外部jsp-api.jar包(在tomcat 下lib包里有),这个类继承SimpleTagSupport 重写doTag()方法. jspprojec包下的helloTag类: 1 ...
- (二十三)JSP指令
一.JSP指令 1.1 JSP指令 JSP指令(directive)是为JSP引擎而设计的,它们并不直接产生任何可见输出,而只是告诉引擎如何处理JSP页面中的其余部分 1.2 在JSP 2.0规范中共 ...
- HALC:用于长读取错误纠正的高吞吐量算法
背景: 第三代PacBio SMRT长读取可以有效地解决第二代测序技术的读长问题,但包含大约15%的测序错误.已经设计了几种纠错算法以有效地将错误率降低到1%,但是它们丢弃了大量未校正的碱基,因此导致 ...
- JS基础_this
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- Axure工作区间
Axure的工作环境可进行可视化拖拉操作,可轻松快速的创建带有注释的线框图.无需编程就可以在线框图中定义简单链接和高级交互.Axure可一体化生成线框图.HTML交互原型.规格说明Word文档.以下是 ...
- java入门学习总结_04
1.循环结构 2.方法 循环结构 概述 1.对于某些需要重复执行的,相同或者相似的语句,使用某种格式来完成对代码的简化. 2.实现的语句: for语句[常用] while语句[常用] do...whi ...
- 根目录/缺少执行权限x产生的两种错误
Linux根目录缺少x权限,产生的两个错误: 以root用户执行systemctl命令报权限相关问题 [root@hps2 ~]# systemctl stop hps-manager * (pktt ...
- Java基于Redis的分布式锁
分布式锁,其实最终还是要保证锁(数据)的一致性,说到数据一致性,基于ZK,ETCD数据一致性中间件做分数是锁,才是王道.但是Redis也能满足最基本的需求. 参考: https://www.cnblo ...
- MacOS文本编辑无法打不开GB18030
不要直接双击打开 而是 打开sublime text或者其他文本编辑后,从软件里面的open选型打开
- springmvc,hibernate整合时候出现Cannot load JDBC driver class 'com.mysql.jdbc.Driver
原因:不清楚是什么原因,哪位知道可以给我留言,不胜感激! 解决方法: 1.把mysql的驱动包放到你项目的WEB-INF目录下的lib目录中2.要mysql的驱动包放在tomcat/lib目录下