0
0

More than 3 years have passed since last update.

python tkinter うまく作動しない

Last updated at Posted at 2019-11-18

pythonのtkinterについての質問です。下のソースコードを実行してみたところ、
  
~~~~~~~~~~~~~~~~~~~
import tkinter as tk
root = tk.Tk()
root.mainloop()
~~~~~~~~~~~~~~~~~~~

エラーが発生してしまいました。↓
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
KeyboardInterrupt Traceback (most recent call last)
<ipython-input-7-059cbc39a2a6> in <module>
1 import tkinter as tk
2 root = tk.Tk()
----> 3 root.mainloop()

~/anaconda3/lib/python3.7/tkinter/__init__.py in mainloop(self, n)
1281 def mainloop(self, n=0):
1282 """Call the mainloop of Tk."""
-> 1283 self.tk.mainloop(n)
1284 def quit(self):
1285 """Quit the Tcl interpreter. All widgets will be destroyed."""

KeyboardInterrupt:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

原因がわかる方よろしくお願いします。
ちなみに環境として、MacからanacondaのJupiter->python3->consoleで実行しました、

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0