模块丢失,而尝试导入的模块已经存在
Module missing while the module trying to import is already there
from PIL import Image
from pytesser import *
image_file = 'E:\Downloads\menu.tiff'
im = Image.open(image_file)
text = image_to_string(im)
text = image_file_to_string(image_file)
text = image_file_to_string(image_file, graceful_errors=True)
print ("=====output=======\n")
print (text)
看到错误显示没有找到模块,但是 util 文件在 tesseract 的目录中 itself.I 不知道为什么会显示找不到。
我的问题在 init.py how to import util.py and errors.py
内部非常简单
from PIL import Image
from pytesser import *
image_file = 'E:\Downloads\menu.tiff'
im = Image.open(image_file)
text = image_to_string(im)
text = image_file_to_string(image_file)
text = image_file_to_string(image_file, graceful_errors=True)
print ("=====output=======\n")
print (text)
看到错误显示没有找到模块,但是 util 文件在 tesseract 的目录中 itself.I 不知道为什么会显示找不到。