idle-python3.2 not starting: complains of NameError: name 'Tk' is not defined

前端 未结 1 1329
忘掉有多难
忘掉有多难 2021-01-29 01:19

running linux mint 13

idle-python3.2 did work from the terminal before, now it does not. Calling idle-python3.2 from the terminal throws the error below BUT I can run I

相关标签:
1条回答
  • 2021-01-29 02:08

    It sounds like you either a) named your little test program "tkinter.py", or b) you have another file in the same directory named "tkinter.py". If that is the case, when you do from tkinter import *, you are not importing the real tkinter but rather importing the local file.

    If you named your file "tkinter.py", rename it. Also, if there is a file named "tkinter.pyc", remove it.

    0 讨论(0)
提交回复
热议问题