首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >为什么Python2.7AMD 64安装程序在32位模式下运行Python?

为什么Python2.7AMD 64安装程序在32位模式下运行Python?
EN

Stack Overflow用户
提问于 2018-08-01 00:16:45
回答 2查看 0关注 0票数 0

我从python.org的python.org安装了python.org的python2.7.amd64.msi包,它安装和运行正常,但似乎处于32位模式,尽管安装程序是64位安装程序。

代码语言:txt
复制
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位模式下实际运行?

EN

回答 2

Stack Overflow用户

发布于 2018-08-01 09:13:08

微软决定让‘long’C类型永远是一个32位有符号整数,甚至在64位系统上也是如此。在大多数Unix系统中,Long至少是32位,但通常是相当大的(PTR)。

票数 0
EN

Stack Overflow用户

发布于 2018-08-01 09:37:44

在我的x86-64 Linux上:

代码语言:txt
复制
$ 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
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/-100005884

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档