我最近安装了Tesseract模块并找到了一些教程,但是我没有遇到互联网上的任何解决方案。这是简单的代码和错误:
from PIL import Image
from tesseract import image_to_string
a = Image.open('/Users/bob/Desktop/108.jpg')
b = image_to_string(a)
print(b)
Run Code Online (Sandbox Code Playgroud)
这是错误:
print 'Creating user config file: {}'.format(_config_file_usr)
^
SyntaxError: invalid syntax
Run Code Online (Sandbox Code Playgroud)
这是图像:108.png
tesseract ×1