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. PAT-1014 Waiting in Line (30 分) 优先队列

    Suppose a bank has N windows open for service. There is a yellow line in front of the windows which ...

  2. (六)Hibernate的增删改查操作(3)

    一.在Hibernate中使用原生SQL语句 sql语句面向的是数据库,所以sql语句中对应的不再是bean了,比如sql="select * from user"   在hql中 ...

  3. svn之合并分支

    学习连接 svn的merge使用例子

  4. CCF 201712-1 最小差值

    题目: 问题描述 给定n个数,请找出其中相差(差的绝对值)最小的两个数,输出它们的差值的绝对值. 输入格式 输入第一行包含一个整数n. 第二行包含n个正整数,相邻整数之间使用一个空格分隔. 输出格式 ...

  5. 中国5级行政区域MySQL数据库库

    爬取国家统计局官网的行政区域数据,包括省市县镇村5个层级,其中港澳地区的数据只有3级;台湾地区4级;包含大陆地区的邮政编码和经纬度信息. 行政划分的总体结构是: 省->市(州)->县(区) ...

  6. 创建多线程时,为何创建后需要Sleep?

    后面的线程用到了前面线程初始的结构,sleep一下只是做到了使前一个线程初始化完成后后一个线程才开始运行.但这样不严格,需要同步机制.在么多个线程都要用的数据结构不要放到子线程内部去初始化,程序启动时 ...

  7. flask小结

    http通讯过程 https://www.cnblogs.com/andy9468/p/10871079.html 1.flask开发环境 https://www.cnblogs.com/andy94 ...

  8. 【hadoop】细读MapReduce的工作原理

    前言:中秋节有事外加休息了一天,今天晚上重新拾起Hadoop,但感觉自己有点烦躁,不知后续怎么选择学习Hadoop的方法. 干脆打开电脑,决定: 1.先将Hadoop的MapReduce和Yarn基本 ...

  9. git 从存储库中删除敏感数据(删除文件历史)

    1.如果您的历史记录中还没有包含敏感数据的存储库的本地副本,请将存储库克隆到本地计算机. git clone https://github.com/YOUR-USERNAME/YOUR-REPOSIT ...

  10. django 新项目

    1.创建虚拟环境 mkvirtualenv - p  python3 2.pycharm : 在pycharm中新建项目, 取名.添加虚拟机上的虚拟环境