Python Forum

Full Version: Help with Tkinter on mac
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I cant import tkinter to use, im using visual studio code, im really desesperate
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)