大写T开头的Tkinter包用于python2 而小写的tkinter包用于python3 下面是python3的程序: from tkinter import * Tk().mainloop()运行结果如下: