import pytesseract from PIL import Image im = Image.open(r’{图片路径}’) print(pytesseract.image_to_string(im))