1、Windows 按 win + R ,打开“运行”窗口。
2、输入 cmd,打开cmd命令行窗口。
3、在命令行中输入以下命令:
pip3 install turtle
4、在安装的过程中 可能会出现 红色的错误提示;
Collecting turtle
Using cached https://files.pythonhosted.org/packages/ff/f0/21a42e9e424d24bdd0e509d5ed3c7dfb8f47d962d9c044dba903b0b4a26f/turtle-0.0.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in File "/tmp/pip-install-hpqxw6_s/turtle/setup.py", line 40
except ValueError, ve:
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-hpqxw6_s/turtle/
提示在 setup.py 文件中 的第40行有语法错误。
5、解决方法:
点击该链接 下载 turtle 0.0.2压缩包,下载压缩包。
然后进行解压,在文件夹中 找到 setup.py 文件,使用文本编辑器打开。