0

I am using Visual Studio Code as my IDE and I am a bit of a beginner with Python so I decided to try out the turtle library built into Python to learn some of the syntax. But, when I tried running just a simple script to see if it would work.But my phython turtle graphics window did not open, it showing me error , i am using ubuntu is that a problem I don't know.

the sample code :

import turtle 
b= turtle.Turtle()
turtle.done()

the error is her:

Traceback (most recent call last):
  File "/home/sayantan/Desktop/grafics/turtle_1.py", line 1, in <module>
    import turtle 
  File "/usr/lib/python3.10/turtle.py", line 107, in <module>
    import tkinter as TK
ModuleNotFoundError: No module named 'tkinter'

I also install and import the module but still give me this Error.

acw1668
  • 40,144
  • 5
  • 22
  • 34
  • 1
    [This answer](https://stackoverflow.com/a/76105219/16775594) might help you. You can check in the **Linux: Python that came with the Linux distribution** section for instructions on installing `tkinter` on Linux. I also suggest you take a look at the [formatting](https://stackoverflow.com/help/formatting) page for information on how to properly format your questions. – Sylvester Kruin May 28 '23 at 12:07

0 Answers0