首页 > 其他 > 详细

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

时间:2019-11-01 23:08:44      阅读:232      评论:0      收藏:0      [点我收藏+]

使用pytesseract识别验证码中遇到异常如下:

pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or its 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

原文:https://www.cnblogs.com/xinxin1994/p/11779755.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!