在我的Mac Mojave 10.14.6上为6.10
并且看起来像运行tkinter时崩溃了/重新启动了我的Mac
已经问过这个问题(请参见下面的链接)Why tkinter fails on Mac
没有人知道哪个版本的python与tkinter兼容
对于那些感兴趣的人,我只运行了一个简单的代码
from tkinter import *
window = Tk()
def printtheword():
print('Success!')
b1 = Button(window,text="Execute",command=km_to_miles)
b1.grid(row=0,column=0)
e1 = Entry(window)
e1.grid(row=0,column=1)
t1 = Text(window,height=1,width=20)
t1.grid(row=0,column=2)
window.mainloop()