python 识别验证码

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" #如果没安装brew
brew install pip #如果没安装pip
brew install tesseract  #安装tesseract
pip install pytesseract  #安装pytesseract包
import sys, os
import pytesseract
from PIL import Image
yzm = str(pytesseract.image_to_string(Image.open('yzm.jpg')))
print(yzm)
posted @ 2017-09-02 14:51  水郁  阅读(245)  评论(0编辑  收藏  举报
……