Python 学习(一) 32位还是64位
来源:互联网 发布:erp软件实施工程师 编辑:程序博客网 时间:2024/05/21 18:30
打开Python看到如下信息:
Python2.7(r27:82525,Jul42010,07:43:08)[MSC v.150064 bit (AMD64)] on win32Type"help","copyright","credits"or"license"for more information.
>>> import sys, platform
>>> platform.architecture()
('64bit','WindowsPE')
>>> sys.maxint2147483647
总是有些疑惑:我的python到底是32位还是64位呢?解释各不相同,
<code><span class="pun">第一种解释:<span class="pun"><span style="font-family:Arial;">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.参见:<a target=_blank target="_blank" href="http://stackoverflow.com/questions/3411079/why-does-the-python-2-7-amd-64-installer-seem-to-run-python-in-32-bit-mode%E3%80%82">http://stackoverflow.com/questions/3411079/why-does-the-python-2-7-amd-64-installer-seem-to-run-python-in-32-bit-mode。</a></span></span></span></code>
<code><span class="pun"><span class="pun"><span style="font-family:Arial;"><span style="font-family:Courier New;">系统仍然维持了一个sys<span class="pun">.</span><span class="pln">maxint的变量,值为 </span><span class="lit">2147483647。但是并不一定说这个python就是32位的。</span></span></span></span></span></code>
<code><span class="pun"><span class="pun"><span style="font-family:Arial;">第二种解释:</span></span></span></code>
<code><span class="pun">Python 2.7: Python的版本是2.7的</span></code>
<code><span class="pun">Win32 -> 指的就是Windows系统;</span></code>
<code><span class="pun">64 bit- > 指的是Windows是64位的;</span></code>
<code><span class="pun">AMD64 -> 指的就是 CPU是x64的</span><span class="pln"></span></code>
第三种解释:
如何查看python是32位还是64位:参见 :http://blog.csdn.net/waleking/article/details/7566842
import struct
struct.calcsize("P")
如果是4,说明是32位的;如果是其他的是,64位的。struct.calcsize用于计算格式字符串所对应的结果长度。
0 0
- Python 学习(一) 32位还是64位
- Python 学习(一) 32位还是64位
- 64位还是32位
- python 判断Dll是32位还是64位
- 如何查看Python是32位还是64位
- python 查看32位还是64位的
- 怎么查看python是32位还是64位的
- python查看是32位还是64位版本
- python查看是32位还是64位版本
- 查看python是32位的还是64位的
- 查看python是32位还是64位
- java学习-【转】32位jvm还是64位jvm?
- 安装Python(32位、64位)
- 检测java 32位还是64位
- 查看linux 32位还是64位
- 32位jvm还是64位jvm?
- 查看linux 32位还是64位
- mac下查看系统位64位还是32位
- 大话设计模式之简单工厂模式、抽象工厂模式及工厂方法模式的比较
- 用MinGW编译Win32 GDI应用程序
- java封装FFmpeg命令,支持原生ffmpeg全部命令,实现FFmpeg多进程处理与多线程输出控制(开启、关闭、查询),rtsp/rtmp推流、拉流
- 10291
- HDU 5934 Bomb(强连通分量缩点)
- Python 学习(一) 32位还是64位
- 教你校验 Debian 软件包的MD5
- 搭建网盘
- HTML 6 样式
- DateConverter does not support default String to ‘Date’ conversion.
- 计算数
- Spring Data JPA + JNDI配置
- 《转》MIMO技术杂谈(一):鱼与熊掌能否兼得?--浅谈分集与复用的权衡
- 10292