M
M
MarshallPrice2022-04-20 19:49:39
linux
MarshallPrice, 2022-04-20 19:49:39

Why can't it find the tkinter module?

For some reason it can't find the module. ModuleNotFoundError: No module named 'tkinter'. I have pip, python, tk installed. I did it with pacman and pip. I ran the program on VSC and PyCharm. One and the same mistake.
626035d8488f6376008794.png
PS I have Linux Manjaro.

How can this be fixed?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
AVKor, 2022-04-20
@AVKor

import tkinter as tk
window = tk.Tk()
window.title('Hello World!')
window.mainloop()

S
Sergey Gornostaev, 2022-04-20
@sergey-gornostaev

Maybe Python 2 is being used? Thenimport Tkinter

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question