mac下python3 + tesseract + pytesseract 的安装与调试

  1. 第一步brew install tesseract

一定要用brew install tesseract
pip install tesseract会出问题,brew install tesseract-ocr也会出问题

2.第二部 pip3 install pytesseract

3.第三部测试
随便网上下载一个验证码的图片作为测试

from PIL import Image
from pytesseract import *

image = Image.open('test.jpeg')
#识别过程
text = image_to_string(image)
print(text)

猜你喜欢

转载自blog.csdn.net/weixin_38246633/article/details/82993678