0
from tkinter import *
from PIL import ImageTk, Image
top = Tk()
file ='flame2.jpg'
filename = PhotoImage(file)
panel=PanedWindow()
panel = Label(top, image = filename)
panel.pack(side = "bottom", fill = "both", expand= "yes")
top.mainloop()
my_image = Image.open( “flame2.jpg”) AttributeError的:对象类型'图像'没有属性'打开' 编译你发送的代码后,这是错误发生。 –
尝试'导入PIL.Image'而不是'从PIL导入图像' –
错误保持不变。 –