Code:
The import tesserocr
The from PIL import Image
Image=image. Open (' C:/20161202111647560 PNG ')
Result=tesserocr. Image_to_text (image)
Print (result)
By installing the tesseract, OCR download language pack:
Output:... is normal, just recognition rate is not high,
But if making download a tesseract - OCR language pack, replace the original file after complains:
RuntimeError: Failed to init API, possibly an invalid tessdata path:
C: \ Users \ \ Administrator \ \ AppData \ Local \ designed \ Python Python37 \ Tesseract OCR \ tessdata/
O teach!!!!!!