问题描述
我正在尝试在pycharm中安装turtle包,但是在安装时出现此错误:
Collecting turtle
Using cached turtle-0.0.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>",line 1,in <module>
File "C:\Users\Ptr\AppData\Local\Temp\pycharm-packaging\turtle\setup.py",line 40
except ValueError,ve:
except ValueError,ve:
^
SyntaxError: invalid Syntax
----------------------------------------
Command "python setup.py egg_info" Failed with error code 1
我不知道该怎么办,请帮帮我。
解决方法
pip
从PyPI安装turtle
0.0.2。 2009年发布。该代码显然仅适用于Python2。
您不需要安装turtle
,因为至少是python 2.6,所以它是a module from the standard library。只需导入并使用。