from PIL import Image import pytesseract image = Image.open('demo.png') content = pytesseract.image_to_string(image, lang='chi_sim') print('demo图片中的文字内容提取出为:', content)