搜索出了一堆错误的查询python是什么位数的代码

import platform

platform.architecture()

上述代码查出的是系统的位数而不是python版本的位数

正确的打开方式是

Mac在terminal,windows在cmd

##window输入python便可get全部信息

##mac查看python版本

python --version

python -V

##mac查看python更多信息(包括位数)

python -VV

#是VV不是W

用python自身去查询也OK

import sys

print(sys.version)

用python自身去查python版本(3.0还是2.0)

import platform

print (platform.python_version())

参考:https://learnpython.com/blog/check-python-version/

Copyright © 2088 樊振东世界杯_世界杯开幕 - tyzksb.com All Rights Reserved.
友情链接