【发布时间】:2020-09-24 13:34:43
【问题描述】:
我正在检查我使用的 Python Shell 版本(32 位还是 64 位)。
当我跑步时
>>> import platform
>>> print(platform.architecture())
我明白了:
('64bit', 'WindowsPE')
但是
如果我跑步
>>> import sys
>>> sys.platform
我明白了:
'win32'
谁能给我解释一下?
我在安装过程中做错了吗?
【问题讨论】:
-
win32正是sys.platform在 Windows 下设置的值,无论您是否在 32 位平台上。 -
哦,谢谢。但这是为什么呢?
-
@catLuck 请参阅here 以获得可能的答案。这是“历史性的”。