安装问题 sudo apt-get install python3-tk 图标问题 _tkinter.TclError: bitmap “xxx.ico” not defined 解决: 安装pillow包 pip3 install pillow import tkinter from PIL.ImageTk import PhotoImage root= tkinter.Tk() icon = PhotoImage(file="xxx.ico") root.tk.call