Score:0

ModuleNotFoundError: No module named 'tkinter'

us flag

The aforementioned error showed up when I tried to use the Turtle class. I was following a tutorial where it's used to pop up a window in the screen. The code is simple:

from turtle import Turtle, Screen
jabba = Turtle()
print(jabba)

my_screen = Screen()
print(my_screen.canvheight)
my_screen.exitonclick()

But in the terminal it says:

ModuleNotFoundError: No module named 'tkinter'

I'm on Ubuntu 20.04 using PyCharm professional IDE.

karel avatar
sa flag
Does this answer your question? [unable to install/import tkinter](https://askubuntu.com/questions/505141/unable-to-install-import-tkinter)
Score:2
in flag

Run this command on terminal

sudo apt-get install python-tk
Score:1
us flag

Installing python3-tk solved it:

sudo apt-get install python3-tk
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.