如何在 Windows 上从 .tar 文件安装 Python

Amm*_*agh 9 python windows installation python-3.x

如何在 Windows 上安装没有安装程序且仅 .tar/.tar.gz/.tar.xz 的 Python 版本?

\n

我将其解压到一个文件夹中并尝试了python setup.py install,因为显然,这就是你的做法。我得到这样的回应:

\n
Traceback (most recent call last):\n  File "C:\\Users\\(user)\\Documents\\Downloads\\Python-3.7.10\\setup.py", line 29, in <module>\n    set_compiler_flags(\'CFLAGS\', \'PY_CFLAGS_NODIST\')\n  File "C:\\Users\\(user)\\Documents\\Downloads\\Python-3.7.10\\setup.py", line 27, in set_compiler_flags\n    sysconfig.get_config_vars()[compiler_flags] = flags + \' \' + py_flags_nodist\nTypeError: unsupported operand type(s) for +: \'NoneType\' and \'str\'\n
Run Code Online (Sandbox Code Playgroud)\n

我尝试摆弄 pcbuild 并阅读无数的自述文件,但仍然不知道该怎么做。我安装了Visual\xc2\xa0Studio\xc2\xa02019,这可能重要也可能不重要。我当前运行的是 Python 3.9.2,并使用常规 .exe 安装程序安装了 3.8.8。我做错了什么?

\n

小智 -2

您看到的错误是因为py_flags_nodist未定义。看起来代码正在尝试将字符串与 NoneType 对象连接起来。您可能需要检查 setup.py 文件以了解它为何尝试执行此操作。

  • 这都是错误的(它与“py_flags_nodist”无关),并且完全错过了问题的要点 (3认同)