0

I am newbie , I write 5 line of tkinter but it not runs giving error that

Traceback (most recent call last):
  File "/Users/pathparakh/Projects/python/tk/hello.py", line 1, in <module>
    from _tkinter import *
ModuleNotFoundError: No module named '_tkinter'

my code is

from tkinter import *

root = Tk()
hi = Label(root, text='hi').pack()
root.mainloop()

but before 5 hour it runs properly.

1 Answers1

0

I successfully fixed this problem by running the following command:

brew install python-tk@3.9
Sunderam Dubey
  • 1
  • 11
  • 20
  • 40