【问题标题】:Building Python from the source as 64 bit从源代码构建 Python 为 64 位
【发布时间】:2023-03-25 20:59:02
【问题描述】:

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

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

  • GitHub下载源码

  • 按照 in the documentation 的建议运行 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.
>>>

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

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

如何将 Python 构建为 x64 位?

【问题讨论】:

  • build.bat -p x64。运行 build.bat -h 以列出选项。自述文件explains this。开发指南告诉您阅读它。
  • @eryksun 这比我想象的要容易。我怎么没找到?您能否考虑留下答案。
  • 很高兴能帮上忙,但我认为您应该删除该问题。这是从开发指南到自述文件到使用 build.bat 部分以列出带有build -h 的选项的直接路径,它清楚地显示了如何以 x64 为目标。如果我们对记录过程中的每条直接路径都有问题和答案,我们就会淹没在数十亿个问题的喧嚣中。

标签: python windows build


【解决方案1】:
build.bat -p x64

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

READMEexplains this。开发指南让您阅读。

-eryksun给出的 cmets 中的答案

【讨论】:

    猜你喜欢
    • 2016-04-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-04-02
    • 1970-01-01
    • 2020-07-31
    相关资源
    最近更新 更多