我无法得到我的Python图

2024-04-20 11:29:55 发布

您现在位置:Python中文网/ 问答频道 /正文

每次我放进口乌龟总是这样

Traceback (most recent call last):
  File "<pyshell#6>", line 1, in <module>
    import turtle
  File "C:/Users/Notandi/AppData/Local/Programs/Python/Python35-32\turtle.py", line 2, in <module>
    wn = turtle.Screen()
AttributeError: module 'turtle' has no attribute 'Screen'

Tags: inimportmostlinecallscreenusersfile
2条回答

您命名了一个文件turtle.py,特别是这个:

C:/Users/Notandi/AppData/Local/Programs/Python/Python35-32\turtle.py

因此Python认为该文件是turtle模块。选择一个不同的名字。(顺便说一句,你把文件放在那里似乎很奇怪。)

好吧,sry,我重新安装了python并修复了它。对我可能造成的所有烦恼表示歉意。在

相关问题 更多 >