ModuleNotFoundError: No module named 'tkinter'
Posté : mer. 15 janv. 2025 17:38
Bonjour les Pythoneux,
Nouveau sous Linux Mint, je test vsCode sous Mint:
Je suis dans mon environnement avec python, comme le confirme le terminal:
.venvah@ah-Aspire-V5-573G:~/PyDeb$ python3
Python 3.13.1 (main, Dec 4 2024, 08:54:15) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
J'essaie une petite fonction: pas de soucis, le code s'exécute normalement.
Ensuite :
from tkinter import *
from tkinter import ttk
root = Tk()
frm = ttk.Frame(root, padding=10)
frm.grid()
ttk.Label(frm, text="Hello World!").grid(column=0, row=0)
ttk.Button(frm, text="Quit", command=root.destroy).grid(column=1, row=0)
root.mainloop()
====>ModuleNotFoundError: No module named 'tkinter'
J'ai contrôlé dans le terminal: même msg d'erreur!
Bizarre, bizarre...Comme c'est étrange.
tkinter a changé de nom sous linux?
Une suggestion?
Bonne fin d'après-midi.
Nouveau sous Linux Mint, je test vsCode sous Mint:
Je suis dans mon environnement avec python, comme le confirme le terminal:
.venvah@ah-Aspire-V5-573G:~/PyDeb$ python3
Python 3.13.1 (main, Dec 4 2024, 08:54:15) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
J'essaie une petite fonction: pas de soucis, le code s'exécute normalement.
Ensuite :
from tkinter import *
from tkinter import ttk
root = Tk()
frm = ttk.Frame(root, padding=10)
frm.grid()
ttk.Label(frm, text="Hello World!").grid(column=0, row=0)
ttk.Button(frm, text="Quit", command=root.destroy).grid(column=1, row=0)
root.mainloop()
====>ModuleNotFoundError: No module named 'tkinter'
J'ai contrôlé dans le terminal: même msg d'erreur!
Bizarre, bizarre...Comme c'est étrange.
tkinter a changé de nom sous linux?
Une suggestion?
Bonne fin d'après-midi.