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. (四)Hibernate的增删改查操作(1)

    Hiberntae的查找操作有多种: 1.  使用Criteria接口查询 Query_Criteria.java package action; import java.util.ArrayList ...

  2. JSQI网站大事表 | Website Landmark

    2016-07-01 网站前身jsqi.50vip.com上线.2016-07-12 购买jsqi.org域名,替代之前的二级域名.2016-12-12 申请ChinaDMOZ收录,瞬间申请通过.20 ...

  3. elementui更改导航栏样式

    本来是这样,有下划线有点击背景,但是业务需求不需要,就想办法进行隐藏,控制台可以观察效果找出相应的类进行格式书写 以下效果: 放上代码 <style> .el-menu-demo{ hei ...

  4. 通过Nginx统计网站的PV、UV、IP

    转载:通过Nginx统计网站的PV.UV.IP 概念 UV:独立访客:以cookie为依据,假设一台电脑装有3个不同的浏览器,分别打开同一个页面,将会产生3个UV.PV:访问量:页面每访问或刷新一次, ...

  5. 8.读写锁ReadWriteLock

    /*ReadWriteLock 读写锁*/ private ReadWriteLock lock = new ReentrantReadWriteLock(); lock.readLock().loc ...

  6. umi model 注册

    model 分两类,一是全局 model,二是页面 model.全局 model 存于 /src/models/ 目录,所有页面都可引用:页面 model 不能被其他页面所引用. 规则如下: src/ ...

  7. tcp关闭连接:挥手讨论

    讨论焦点: 如果client发送FIN后,服务器端未返回完成的数据(缓存区中)还执行返回吗? 参考文档:https://download.csdn.net/download/u013547552/10 ...

  8. Maven 三种archetype说明--转载

    版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明. 原文链接:https://blog.csdn.net/cx1110162/article/deta ...

  9. 配置由Spring处理json乱码

    <mvc:annotation-driven> <mvc:message-converters register-defaults="true"> < ...

  10. 8.vue-resource 数据请求基本实现

    1.vue-resource 实现 get, post, jsonp请求:https://github.com/pagekit/vue-resource 注意: 除了 vue-resource 实现数 ...