Python Forum
Help with Tkinter on mac
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with Tkinter on mac
#1
I cant import tkinter to use, im using visual studio code, im really desesperate
Reply
#2
It is usually installed along with python.
Are you sure it's not there?
try:
import tkinter as tk

root = tk.Tk()
root.mainloop()
Note that if you are using antique python (version < 3.0) it's:
import Tkinter as tk

root = tk.Tk()
root.mainloop()
with a capital 'T' (lower case after python 3.0)
Reply


Forum Jump:

User Panel Messages

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