Hello team,
So I installed tkinter using
But when I try to run the following code
I get the following error:
This is driving me crazy, because I have the tk lib installed
And tried to import it in different ways
Nothing seems to work, could you please help?
[SOLVED]
Run command
So I installed tkinter using
1 |
pip3 install tk |
1 2 3 4 |
import tkinter as tk root = tk.Tk() root.mainloop() |
1 2 3 4 |
Traceback (most recent call last): File "iwannadie.py" , line 1 , in <module> import tkinter as tk ModuleNotFoundError: No module named 'tkinter' |
1 2 |
pip3 list | grep tk tk 0.1 . 0 |
And tried to import it in different ways
1 2 3 |
import tkinter as tk from tkinter import * import tk |
Nothing seems to work, could you please help?
[SOLVED]
Run command
sudo apt-get install python3-tk