简体   繁体   中英

Tkinter Python AWS Cloud9

is there the possibility to import Tkinter modul in IDE AWS Cloud9 (Python)? This simple program doesn't work (No module name 'Tkinter'). Any suggestion? Thanks

from tkinter import Label # get a widget 
object
widget = Label(None, text='Hello GUI 
world!') # make one
widget.pack() # arrange it
widget.mainloop() # start event loop

Have you checked tkinter is sucessfully installed or not? check it by using pip freeze

if it is not installed then try this command python3

sudo apt-get install python3-tk

python2

sudo apt-get install python-tk

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM