我从python.org的python.org安装了python.org的python2.7.amd64.msi包,它安装和运行正常,但似乎处于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位模式下实际运行?
发布于 2018-08-01 09:13:08
微软决定让‘long’C类型永远是一个32位有符号整数,甚至在64位系统上也是如此。在大多数Unix系统中,Long至少是32位,但通常是相当大的(PTR)。
发布于 2018-08-01 09:37:44
在我的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
https://stackoverflow.com/questions/-100005884
复制相似问题