from PIL import Image
from pytesser import *
image_file = 'D:\plate.jpg'
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这让我错了
C:\Users\KEN\Anaconda2\python.exe C:/Users/KENIL/PycharmProjects/plate/ocr.py
Traceback (most recent call last):
File "C:/Users/KEN/PycharmProjects/plate/ocr.py", line 2, in <module>
from pytesser import *
File "C:\Users\KEN\PycharmProjects\plate\pytesser.py", line 6, in <module>
import Image
ImportError: No module named Image即使我已经正确安装了ananconda和pillow screenshot of package installed
发布于 2017-02-01 15:55:44
您发布的代码没有该错误。从错误消息中可以看出,错误出现在模块pytesser.py中,您可能在没有导入的情况下使用了Image (在第6行:-)。
https://stackoverflow.com/questions/41973958
复制相似问题