Python Forum
[Tkinter] Tkinter wouldn't work with python3.8.3
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Tkinter wouldn't work with python3.8.3
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")
Does anyone know why I am having this problem?
Thanks in advance
You probably do not have tkinter installed for python3.8
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
Gaming Collection
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.

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python3 tkinter radiobutton problem Nick_tkinter 14 1,101 Feb-15-2021, 11:01 PM
Last Post: Nick_tkinter
  [Tkinter] ttk-->treeview-->tag_configure() not work over Python3.6 hqbfljx 9 1,599 Jan-20-2021, 06:24 PM
Last Post: Larz60+
  Call local variable of previous function from another function with Python3 & tkinter Hannibal 5 1,027 Oct-12-2020, 09:16 PM
Last Post: deanhystad
  [Tkinter] Scrollbar doesn't work on Canvas in Tkinter DeanAseraf1 3 5,177 Sep-19-2019, 03:26 PM
Last Post: joe_momma
  [Tkinter] createing a tkinter photoimage from array in python3 pootle 2 11,941 Oct-18-2016, 09:28 AM
Last Post: pootle

Forum Jump:

User Panel Messages

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