Python Forum
Help with Tkinter on mac - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: GUI (https://python-forum.io/forum-10.html)
+--- Thread: Help with Tkinter on mac (/thread-21358.html)



Help with Tkinter on mac - kigrapthor - Sep-26-2019

I cant import tkinter to use, im using visual studio code, im really desesperate


RE: Help with Tkinter on mac - Larz60+ - Sep-26-2019

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)