python3 安装 turtle 解决

pip install turtle
Collecting turtle
Downloading turtle-0.0.2.tar.gz (11 kB)
ERROR: Command errored out with exit status 1:
command: ‘C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe’ -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘”‘”‘C:\\Users\\Administrator\\AppData\\Local\\Temp\\pip-install-7zefn9ri\\turtle\\setup.py’”‘”‘; __file__=’”‘”‘C:\\Users\\Administrator\\AppData\\Local\\Temp\\pip-install-7zefn9ri\\turtle\\setup.py’”‘”‘;f=getattr(tokenize, ‘”‘”‘open’”‘”‘, open)(__file__);code=f.read().replace(‘”‘”‘\r\n’”‘”‘, ‘”‘”‘\n’”‘”‘);f.close();exec(compile(code, __file__, ‘”‘”‘exec’”‘”‘))’ egg_info –egg-base ‘C:\Users\Administrator\AppData\Local\Temp\pip-pip-egg-info-i_n1mbsg’
cwd: C:\Users\Administrator\AppData\Local\Temp\pip-install-7zefn9ri\turtle\
Complete output (6 lines):
Traceback (most recent call last):
File “<string>”, line 1, in <module>
File “C:\Users\Administrator\AppData\Local\Temp\pip-install-7zefn9ri\turtle\setup.py”, line 40
except ValueError, ve:
^
SyntaxError: invalid syntax
—————————————-
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

 

直接下载

https://files.pythonhosted.org/packages/ff/f0/21a42e9e424d24bdd0e509d5ed3c7dfb8f47d962d9c044dba903b0b4a26f/turtle-0.0.2.tar.gz

解压

修改 setup.py 第40行为

except (ValueError, ve):

重新执行本地包安装:

pip install -e E:\python_work\turtle-0.0.2

在Power Shell中运行提示

系统没法将文件移到不同的磁盘驱动器

在CMD中安装:

error: Microsoft Visual C++ 14.0 is required. Get it with “Build Tools for Visual Studio”

在网上找到一个工具 Microsoft Visual C++ build tools,此工具只安装Visual C ++ 14.0,而不安装Visual Studio。

外链: lanzous.com/b0cju0voh

密码: htjy

下载: visualcppbuildtools_full.exe 安装

配制源,创新系统还原点, 下载半天, 总算装上了.

原文链接:,转发请注明来源!

发表评论

要发表评论,您必须先登录