tkinter默认不支持jpg图像格式, 只支持gif格式。
解决方法是: 使用pip安装pillow(PIL)库, 因为PIL库对tkinter和图像有较好的支持。
from PIL import Image,ImageTk img=Image.open("图标\\blackhole.jpg")) imtk=ImageTk.PhotoImage(img)