在 Windows 上编译 Python 3.6.9
Compiling Python 3.6.9 on Windows
我正在尝试安装 Python 3.6.9,但遇到了问题。
首先我下载了 Python-3.6.9-tgz,然后解压得到 Python-3.6.9.tar,然后解压得到一个名为 Python-3.6 的文件夹。 9
里面有setup.py
。所以在 windows 10 我打开命令提示符并导航到该文件夹并键入:setup.py install
。这打开了 visual studio 我已经拥有但什么都不做。如果我需要做其他事情,请告诉我。
我尝试添加环境变量,但没有任何效果。
首先:你真的应该下载 Python 3.7.4。 Python 3.7 向后兼容 Python 3.6.
Python 3.6.9 版本是一个 security-only 版本,主要针对必须继续支持 3.6.x 包的 Long-term-support Linux 发行版.因此,不提供二进制安装程序,Windows 用户应该已经升级到 3.7。
如果您仍然觉得要编译 Python 3.6.9,那么 README.rst 文件包含 Unix、Linux、BSD、macOS 和 Cygwin 的安装说明,以及for Windows 指向一个专用文件:
On Windows, see PCbuild/readme.txt.
可在 https://github.com/python/cpython/blob/v3.6.9/PCbuild/readme.txt 在线找到。同一目录包含一个批处理脚本,旨在使 Python 在 Windows 上的构建更容易。来自以上文档:
Building Python using the build.bat script
In this directory you can find build.bat
, a script designed to make
building Python on Windows simpler. This script will use the env.bat
script to detect one of Visual Studio 2015, 2013, 2012, or 2010, any of
which may be used to build Python, though only Visual Studio 2015 is
officially supported.
By default, build.bat
will build Python in Release configuration for
the 32-bit Win32 platform. It accepts several arguments to change
this behavior, try build.bat -h
to learn more.
构建过程间接使用setup.py
脚本。不要 运行 自己做。
我正在尝试安装 Python 3.6.9,但遇到了问题。 首先我下载了 Python-3.6.9-tgz,然后解压得到 Python-3.6.9.tar,然后解压得到一个名为 Python-3.6 的文件夹。 9
里面有setup.py
。所以在 windows 10 我打开命令提示符并导航到该文件夹并键入:setup.py install
。这打开了 visual studio 我已经拥有但什么都不做。如果我需要做其他事情,请告诉我。
我尝试添加环境变量,但没有任何效果。
首先:你真的应该下载 Python 3.7.4。 Python 3.7 向后兼容 Python 3.6.
Python 3.6.9 版本是一个 security-only 版本,主要针对必须继续支持 3.6.x 包的 Long-term-support Linux 发行版.因此,不提供二进制安装程序,Windows 用户应该已经升级到 3.7。
如果您仍然觉得要编译 Python 3.6.9,那么 README.rst 文件包含 Unix、Linux、BSD、macOS 和 Cygwin 的安装说明,以及for Windows 指向一个专用文件:
On Windows, see PCbuild/readme.txt.
可在 https://github.com/python/cpython/blob/v3.6.9/PCbuild/readme.txt 在线找到。同一目录包含一个批处理脚本,旨在使 Python 在 Windows 上的构建更容易。来自以上文档:
Building Python using the build.bat script
In this directory you can find
build.bat
, a script designed to make building Python on Windows simpler. This script will use theenv.bat
script to detect one of Visual Studio 2015, 2013, 2012, or 2010, any of which may be used to build Python, though only Visual Studio 2015 is officially supported.By default,
build.bat
will build Python in Release configuration for the 32-bit Win32 platform. It accepts several arguments to change this behavior, trybuild.bat -h
to learn more.
构建过程间接使用setup.py
脚本。不要 运行 自己做。