从源代码构建 64 位 Python

Sim*_*mon 8 python windows build

我假设 Python XX(我的情况是 3.8)尚未发布,因此尚未编译下载,如果我想运行 x64 位版本,我需要自己编译它。

我安装了 Visual Studio Express,并尝试从源代码构建 Python。到目前为止我这样做了:

  • 从GitHub下载了源码

  • 按照文档中的cpython\PCbuild\build.bat建议运行(我没有看到任何内容说明如何构建 x64 位)

  • 等待

构建完成后,我运行python.exe并得到以下信息:

Python 3.8.0a0 (heads/master:cac4fef886, Jun 16 2018, 12:39:58) [MSC v.1914 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
Run Code Online (Sandbox Code Playgroud)

这个Python是x32位的(由于v.1914 32 bit (Intel)

我查看了一下SpecialBuilds.txt,也没有运气。

如何将 Python 构建为 x64 位?

Sim*_*mon 12

build.bat -p x64
Run Code Online (Sandbox Code Playgroud)

运行build.bat -h以列出选项。

README 对此进行了解释。开发指南告诉你要阅读它。

- eryksun给出的评论中的答案