Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 6372  / 2 Years ago, tue, august 2, 2022, 5:33:02

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.


More From » 20.04

 Answers
5

Installing python3-tk solved it:


sudo apt-get install python3-tk

[#1390] Wednesday, August 3, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tusmuumu

Total Points: 195
Total Questions: 122
Total Answers: 104

Location: Oman
Member since Tue, Feb 7, 2023
1 Year ago
;