Ошибка при попытке запустить программу с использованием turtle
Выдается ошибка при попытке запустить программу на Turtle Python
import math
import turtle
turtle.bgcolor("black")
turtle.pencolor("black")
turtle.shape("triangle")
turtle.speed(0)
turtle.fillcolor("orangered")
phi = 137.508 * (math.pi/180.0)
for i in range(180+40):
r = 4 * math.sqrt(i)
theta = i * phi
x = r * math.cos(theta)
y = r * math.sin(theta)
turtle.penup()
turtle.goto(x,y)
turtle.setheading(i*137.508)
turtle.pendown()
if i < 160:
turtle.stamp()
else:
turtle.fillcolor("yellow")
turtle.begin_fill()
turtle.left(-5)
turtle.circle(500,25)
turtle.right(-155)
turtle.circle(500,25)
turtle.end_fill()
turtle.hideturtle()
turtle.done()
Выдается ошибка:
valerymokrytska@Valerys-MBP pythooon % /usr/bin/env /usr/bin/python3 /Users/valerymokrytska/.vscode/extensions/ms-python.debugpy-2024.0.0-darwin-arm64/bund
led/libs/debugpy/adapter/../../debugpy/launcher 64249 -- /Users/valerymokrytska/Downloads/pythooon/Flower.py
E+00000.028: Error while enumerating installed packages.
Traceback (most recent call last):
File "/Users/valerymokrytska/.vscode/extensions/ms-python.debugpy-2024.0.0-darwin-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/common/log.py", line 361, in get_environment_description
report(" {0}=={1}\n", pkg.name, pkg.version)
AttributeError: 'PathDistribution' object has no attribute 'name'
Stack where logged:
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/valerymokrytska/.vscode/extensions/ms-python.debugpy-2024.0.0-darwin-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher/__main__.py", line 91, in <module>
main()
File "/Users/valerymokrytska/.vscode/extensions/ms-python.debugpy-2024.0.0-darwin-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher/__main__.py", line 21, in main
log.describe_environment("debugpy.launcher startup environment:")
File "/Users/valerymokrytska/.vscode/extensions/ms-python.debugpy-2024.0.0-darwin-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/common/log.py", line 369, in describe_environment
info("{0}", get_environment_description(header))
File "/Users/valerymokrytska/.vscode/extensions/ms-python.debugpy-2024.0.0-darwin-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/common/log.py", line 363, in get_environment_description
swallow_exception("Error while enumerating installed packages.")
File "/Users/valerymokrytska/.vscode/extensions/ms-python.debugpy-2024.0.0-darwin-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/common/log.py", line 215, in swallow_exception
_exception(format_string, *args, **kwargs)
DEPRECATION WARNING: The system version of Tk is deprecated and may be removed in a future release. Please don't rely on it. Set TK_SILENCE_DEPRECATION=1 to suppress this warning.