识别验证码
import pytesseract
from PIL import Image
image = Image.open('F:\\KnowledgeMap\\Analysis\\CheckCode.jpg')
result = pytesseract.image_to_string(image)
print(result)
报以下错误 pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your pat
解决方法:
pytesseract.py 中 tesseract_cmd = 'tesseract' 改为自己的地址
如--》 tesseract_cmd = 'C:\Program Files (x86)\Tesseract-OCR\\tesseract.exe'