python识别验证码

1、tesseract-ocr安装 

tesseract-ocr windows下载地址

http://digi.bib.uni-mannheim.de/tesseract/tesseract-ocr-setup-4.00.00dev.exe

https://github.com/tesseract-ocr/tesseract/wiki/4.0-with-LSTM#400-alpha-for-windows

安装好之后把安装路径添加到环境变量,我的是C:Program FilesTesseract-OCR

终端输入tesseract -v 显示版本号表示成功添加到环境变量

2.pytesseract安装 
pip3 install pytesseract

pytesseract 是对 Tesseract-OCR 的一个封装,方便我们在 Python 中调用 Tesseract-OCR 引擎

3.Pillow 安装 
pip3 install pillow

还有一种手动识别

input输入验证码

原文地址:https://www.cnblogs.com/z-x-y/p/9032929.html