I'm a python beginner and just started out with my first turtle library program, I am using vscode but it says, "ModuleNotFoundError: No module named 'tkinter'", it gives same error in any online compiler or on ubuntu shell and on vscode as well. here's the simple code :
import turtle as t
w = t.Screen()
turtle_t = t.Turtle()
turtle_t.forward(150)
turtle_t.left(90)
w.exitonclick()
Have you installed the package?
Try pip install tkinter
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.