[Python] tkinter in Spyder

Discussão em 'Python' iniciado por Stack, Abril 27, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying my first steps in tkinter. I use Spyder as IDE in Python 3.5.1, by way of 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)?

    Continue reading...

Compartilhe esta Página