gpt4 book ai didi

python - 为什么 Python 2.7 AMD 64 安装程序似乎以 32 位模式运行 Python?

转载 作者:太空狗 更新时间:2023-10-29 22:08:31 29 4
gpt4 key购买 nike

我已经从 python.org 的 python-2.7.amd64.msi 包中安装了 Python 2.7。它可以正确安装和运行,但似乎处于 32 位模式,尽管安装程序是 64 位安装程序。

Python 2.7 (r27:82525, Jul  4 2010, 07:43:08) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys, platform
>>> platform.architecture()
('64bit', 'WindowsPE')
>>> sys.maxint
2147483647

如何安装 Python 使其真正以 64 位模式运行?

最佳答案

查看讨论 here .它来自 2.6.1,但它似乎仍然适用。至少我在任何地方都没有看到相反的证据。事情的要点(从该链接引用)是:

This is by design. In their infinitive wisdom Microsoft has decided to make the 'long' C type always a 32 bit signed integer - even on 64bit systems. On most Unix systems a long is at least 32 bit but usually sizeof(ptr).

关于python - 为什么 Python 2.7 AMD 64 安装程序似乎以 32 位模式运行 Python?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3411079/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com