为什么Python的2.7 AMD 64的安装程序似乎在32位模式下运行的Python? [英] Why does the Python 2.7 AMD 64 installer seem to run Python in 32 bit mode?
问题描述
我从python.org蟒蛇,2.7.amd64.msi包安装了Python 2.7。它安装并运行正常,但似乎是在32位模式下,尽管安装了一个64位安装程序。
I've installed Python 2.7 from the python-2.7.amd64.msi package from python.org. It installs and runs correctly, but seems to be in 32-bit mode, despite the fact that the installer was a 64 bit installer.
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位模式?
What can I do to install Python so that it actually runs in 64-bit mode?
推荐答案
见讨论的此处。这是从2.6.1,但它似乎仍然适用。我还没有看到相反的证据的任何地方,至少。此事(从这个链接引用)的要点是:
See the discussion here. It's from 2.6.1, but it seems to still apply. I haven't seen evidence to the contrary anywhere, at least. The gist of the matter (quoted from that link) is:
这是设计使然。在他们的不定式智慧微软已经决定 使长的C类型总是32位有符号整数 - 即使是在64位 系统。在大多数Unix系统长至少为32位,但通常 的sizeof(PTR)。
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的2.7 AMD 64的安装程序似乎在32位模式下运行的Python?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!