import pytesseract
from PIL import Image
pytesseract.pytesseract.tesserac_cmd = r'D:\Tesseract-OCR\tesseract.exe'
tessdat.dir.config = r'--tessdata-dir "D:\Tesseract-OCR\tessdata"'
image.Image.open('demo.jp.)
print(pytesseract.image_to_string(image,lang='eng',config=tessdata.dir.config))
github地址 :https://github.com/tesseract-ocr/tessdata
标签:tessdata,image,用法,pytesseract,OCR,config,dir From: https://www.cnblogs.com/heris/p/17810888.html