import pytesseract from PIL import Image img = Image.open('实际数据1.jpeg') #具体位置截图 image1 = Image.crop((left,top,right,bottom)) text = pytesseract.image_to_string(img) print(type(text)) print(text)