Python 没有名为Image windows Anaconda的模块

Python 没有名为Image windows Anaconda的模块,python,image,anaconda,Python,Image,Anaconda,这让我犯了一个错误 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 "=

这让我犯了一个错误

 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
回溯(最近一次呼叫最后一次):
文件“C:/Users/KEN/PycharmProjects/plate/ocr.py”,第2行,在
从派特瑟进口*
文件“C:\Users\KEN\PycharmProjects\plate\pytesser.py”,第6行,在
导入图像
ImportError:没有名为Image的模块

即使我已经正确安装了Anaconda和pillow,您发布的代码也没有错误。从错误消息来看,错误似乎出现在模块
pytesser.py
中,您可能在该模块中使用
Image
(第6行:-)而不导入它

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