|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
不管用什么代码永远返回这个Traceback (most recent call last):
File "/Users/wybll/Documents/Python/3.8turtle.py", line 1, in <module>
import turtle
File "/Users/wybll/Documents/Python/turtle.py", line 2, in <module>
turtle.setup(300,300,None,None)
AttributeError: partially initialized module 'turtle' has no attribute 'setup' (most likely due to a circular import)
小白不懂,求大佬解答^_^
Python import 是先找当前路径是不是有这个模块,你的程序名称是 turtle 那 Python 导入的是你的程序,
并且你的程序里 并没有 setup 函数,所以报错了,你应该把程序的名称改成其他的名字。
|
|