Adam Bernier’s answer可能是正确的.看起来你有一个名为turtle.py的文件,Python在你的Python安装附带之前就已经开始了.
要追查这些问题:
% python
Python 2.7.1 (r271:86832, Jan 29 2011, 13:30:16)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
[...] # Your ${PYTHONPATH}
>>> import turtle
>>> turtle.__file__
'/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/turtle.pyc' # Should be under your Python installation.
>>>
如果你看到这样的话:
>>> import turtle
>>> turtle.__file__
'turtle.py'
然后,您将要在当前工作目录中移动turtle.py(以及任何相应的turtle.pyc或turtle.pyo文件).
根据下面的评论,您可以通过调用help()来查找有关模块的大量信息,包括其路径名和内容.例如:
>>> import turtle
>>> help(turtle)