tkinter in Spyder

匿名 (未验证) 提交于 2019-12-03 09:18:39

问题:

I am trying my first steps in tkinter. I use Spyder as IDE in Python 3.5.1 |Anaconda 4.0.0.

I want to run the very simple script below but it always crashes my Spyder. In a normal shell/bash it runs though and opens the canvas.

import tkinter as tkr  tk = tkr.Tk() canvas = tkr.Canvas(tk, width=500, height=500) canvas.grid() tk.mainloop() 

Under Preferences for the Ipython Console I already tried different settings (i.e. Qt, Automatik, Tkinter) but none of it did help.

What am I doing wrong (and how can I do it better)?

many thanks in advance

回答1:

update to Spyder 3.0.1

https://pythonhosted.org/spyder/

https://github.com/spyder-ide/spyder/releases/tag/v3.0.1

I just did this on win 10: no crash, got blank "tk" separate window



文章来源: tkinter in Spyder
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!