分别在IDLE和spyder中使用下面的定义方法,IDLE可以运行但spyder中直接报错from tkinter import *具体报错信息如下:排除了tkinter模块没安装的情况: 查看完整描述