I am learning OPP and the tutorial I am following is tinkering with the Turtle Module, however when I run this basic code:
from turtle import Turtle
from turtle import Screen
timmy = Turtle()
print(timmy)
timmy.shape("turtle")
timmy.color("red","green")
my_screen = Screen()
print(my_screen.canvheight)
my_screen.exitonclick()
I get this error:
/usr/local/bin/python3.11 /Users/salaheddinefathallah/Files of Salah/Programming/01. Python/03. App Brewery/147 - First OPP Project/main.py
Traceback (most recent call last):
File "/Users/salaheddinefathallah/Files of Salah/Programming/01. Python/03. App Brewery/147 - First OPP Project/main.py", line 1, in <module>
from turtle import Turtle
File "/usr/local/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/turtle.py", line 107, in <module>
import tkinter as TK
File "/usr/local/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/tkinter/__init__.py", line 38, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named '_tkinter'
Process finished with exit code 1
What's the issue?