turtle doesn't work in python
On "import turtle",
I get this:
Traceback (most recent call last):
File "HelloWorld.py", line 1, in <module>
import turtle
File "/usr/lib/python3.6/turtle.py", line 107, in <module>
import tkinter as TK
ModuleNotFoundError: No module named 'tkinter'
2 Answers
4 years ago by Oliver RĂ¼diger
That's because all the code in turtle.py is executed when it's imported, and then again when its encountered after the import statement. Note that Python doesn't try to import modules that it has already imported (unless explicitly told to do so with reload ).
4 years ago by Cute Unicorns
i dont understand
10 months ago by Cecil Whipple