Hi,
I’m trying to use tkinter and I have several problems I think because an error occurs :
ModuleNotFoundError: No module named 'tkinter'
I call
from tkinter import *
I use Fedora 40 and VScode.
1rst problem
In the terminal of VScode it’s python 3.11.9 and the sys.path is /usr/lib/…
In the terminal of fedora it’s python 3.12.4 and the sys.path is /usr/lib64/…
2nd problem
Even if I have the nomodule error, I try in both terminals (vscode and fedora) to install tkinter :
pip install tk
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: tk in /var/data/python/lib/python3.11/site-packages (0.1.0)
If it’s still relevant, trying to look which python version it’s actually activated with ‘which python3’ command. Also trying to list packagesin your python version looking for tkinter. Last thing, i don’t know about fedora but for linux environments tkinter should come when you install python3 … something like python3-tkinter.