[Tkinter] Tkinter wouldn't work with python3.8.3 - 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: [Tkinter] Tkinter wouldn't work with python3.8.3 (/thread-27064.html) |
Tkinter wouldn't work with python3.8.3 - shay_xs - May-24-2020 Hi, I am new to python and Tkinter, I have a very simple code to run see if everything works. But it seems that it only works with the default python MacBook has, which is Python 2.7 When I try to run it with python 3.8 it only pops out a blank window with a black background. Here is my code: import tkinter as tk window = tk.Tk() greeting = tk.Label(text="Hello, Tkinter") greeting.pack() window.mainloop()Does anyone know why I am having this problem? Thanks in advance RE: Tkinter wouldn't work with python3.8.3 - menator01 - May-24-2020 You probably do not have tkinter installed for python3.8 RE: Tkinter wouldn't work with python3.8.3 - Larz60+ - May-24-2020 first see which version of python you are running from command line: python -V If it's not python3, try: python3 -V if neither is python 3, you either don't have it installed, or it's not in you path or environment. if one shows python 3, using that one, from command line type: python or python3 you shoud be in interactive python. type: import tkinter if it returns without error, then tkinter is available. |