Why does the Python 2.7 AMD 64 installer seem to run Python in 32 bit mode?

后端 未结 2 1169
清酒与你
清酒与你 2020-11-28 13:43

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

2条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-28 14:40

    On my x86-64 Linux:

    $ python
    Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
    [GCC 4.4.3] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import sys, platform
    >>> platform.architecture()
    ('64bit', 'ELF')
    >>> sys.maxint
    9223372036854775807
    

    Of course, what matters more than integer size is how much memory you can allocate. Maybe your smaller ints won't really matter much, since Python will just promote to a long any way, but if you can allocate more than three gigs of memory, you'll still be enjoying the benefits of 64 bit execution.

提交回复
热议问题