我开始使用Tkinter python库学习GUI开发,但我遇到了PyCharm IDE社区版4.5.2的问题
我的问题是:当我在IDLE中编写下面的代码时,它运行正常!但是当我使用PyCharm IDE编写它时,会出现以下错误消息:AttributeError:'module'对象没有属性'Tk'请帮助我,我真的需要帮助并且非常感谢你
我的代码:
import Tkinter
app = Tkinter.Tk()
app.title("hello world")
app.minsize(300, 300)
helloLabel = Tkinter.Label(app, text="hello GUI")
helloLabel.pack()
app.mainloop()
Run Code Online (Sandbox Code Playgroud)
注意:我使用的是Python 2.7.6,操作系统:Ubuntu 14.04 LTS