tkinter.TclError: bitmap “xxx.ico” not defined
解决办法:
安装pip3 install pillow
import tkinter from PIL.ImageTk import PhotoImage tkc = tkinter.Tk() img = PhotoImage(file="11.ico") tkc.tk.call('wm', 'iconphoto', tkc._w, img) tkc.mainloop()
解决办法:
安装pip3 install pillow
import tkinter from PIL.ImageTk import PhotoImage tkc = tkinter.Tk() img = PhotoImage(file="11.ico") tkc.tk.call('wm', 'iconphoto', tkc._w, img) tkc.mainloop()