Код: Выделить всё
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()
Код: Выделить всё
/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
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
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
import _tkinter # If this fails your Python may not be configured for Tk
^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named '_tkinter'
Process finished with exit code 1
Подробнее здесь: https://stackoverflow.com/questions/763 ... -on-python