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] 系统找不到指定的文件。的更多相关文章

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

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

  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. Apache:系统找不到指定的文件: No installed ConfigArgs for the service "Apache2"

    解决方法: 将以下内容保存成FixApacheError.reg文件(其中红色粗体Apache2改成报错的系统服务名称,如"RTX_HTTPServer"),导入系统注册表 Fix ...

  4. 系统找不到指定文件 No installed service name 'Apache2'

    原因:系统服务中没有apache2服务 解决方法: 开始 --运行 --- 输入“CMD”出来DOS窗口---- 输入 D: 回车 再输入 cd D:/Program Files(x86)/Apach ...

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

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

  7. 报错解决——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 ...

  8. tesseract-ocr,tesseract,pytesseract在windows下怎么安装

    废话不多说,直接介绍如何下载安装tesseract-OCR以及pytesseract和PIL资源 文末百度网盘都有Tesseract是一个开源的OCR引擎,能识别100多种语言(中,英,韩,日,德,法 ...

  9. pytesseract使用

    1.安装pip install pytesseract 2.安装tesseract-ocr,下载地址:https://github.com/UB-Mannheim/tesseract/wiki,我安装 ...

随机推荐

  1. 再谈 pm2

    比forever好用,对Ubuntu和centos更友好,性能监控.自动重启.负载均衡,适用于laas场景, 总之,pm2是一个带有负载均衡功能的Node应用的进程管理器,可以实现在云服务器上,对no ...

  2. MarkDown 语法大全查询

    目录 1. 斜体和粗体 2. 分级标题 3. 超链接 3.1. 行内式 3.2. 参考式 3.3. 自动链接 4. 锚点 5. 列表 5.1. 无序列表 5.2. 有序列表 5.3. 定义型列表 5. ...

  3. Quartz任务调度:MisFire策略和源码分析

    Quartz是为大家熟知的任务调度框架,先看看官网的介绍: ---------------------------------------------------------------------- ...

  4. 注解@Slf4j使用

    我们在写代码的时候需要加入日志打印,如果不想每次都写private  final Logger logger = LoggerFactory.getLogger(XXX.class); 那么可以用注解 ...

  5. 关于ECharts甘特图的实现

    对于使用ECharts图表的步骤,每种图表都是一致的,相信大家也都了解 此处只分享甘特图的option,代码如下: option: { title: { text: '项目实施进度表', left: ...

  6. 安装window、linux双系统

    一.安装windows,从主硬盘中分出40G空间: 二.下载linux ios镜像; 三.安装UltraISO,把下载好的linux镜像写入u盘: ‘写入硬盘镜像’->写入方式‘usb-HDD+ ...

  7. CVE-2019-0214: Apache Archiva arbitrary file write and delete on the server

    CVE-2019-0214: Apache Archiva arbitrary file write and delete on the server Severity: Medium Vendor: ...

  8. zookeeper:1

    分布式环境的特点 分布性:多台机器位置不同,但是相互协同做某一件事情. 并发性:程序运行过程中,并发性操作是很长见的.比如:同一个分布式系统中的多个节点,同时访问一个共享资源.(数据库,分布式存储) ...

  9. Vue下的index.html

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name ...

  10. 4.使用webpack-dev-server工具实现自动打包编译的功能

    使用webpack-dev-server这个工具,来实现自动打包编译的功能 1.运行 npm i webpack-dev-server -D 把这个工具安装到项目的本地开发依赖 或者运行 cnpm i ...