Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
tkinter
#11
I installt python-tk and it works with python2 but not with python3.
Reply
#12
Note: spelling in python 2 it's Tkinter (capitalized)
in python 3 it's tkinter (not capitalized)
Reply
#13
But python gave me this output:
Traceback (most recent call last):
File "/home/linuxgamer21/Schreibtisch/animationentest.py", line 2, in <module>
import tkinter as tk
ModuleNotFoundError: No module named 'tkinter'
with this code:
#!/usr/bin/python3
import tkinter as tk
 
root = tk.Tk()
  
thelabel = tk.Label(root, text="this is too easy")
thelabel.pack()
root.mainloop()
Reply
#14
In Ubuntu, you need to install python3-tk
Reply
#15
it works thankyou!
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020