sys.version和sys.version_info 查看版本

简介:
>>> sys.version
'3.6.2 (v3.6.2:5fd33b5926, Jul 16 2017, 20:11:06) \n[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]'
>>> sys.version_info
sys.version_info(major=3, minor=6, micro=2, releaselevel='final', serial=0)

>>> if sys.version_info > (3,6):
print('yes')
else:
print('no')

yes
目录
相关文章
|
4月前
|
JavaScript
npm install 报错 import sys; print“%s.%s.%s”% sys.version_info[ :3] ;
npm install 报错 import sys; print“%s.%s.%s”% sys.version_info[ :3] ;
111 3
|
Java Linux
解决OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0...
解决OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0...
1145 0
|
6月前
|
SQL 流计算
"Missing version in readMessageBegin, old client?
"Missing version in readMessageBegin, old client?
78 1
|
6月前
|
Linux
【linux】报错pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: ‘0.23ubuntu1’
【linux】报错pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: ‘0.23ubuntu1’
|
6月前
|
SQL 流计算
Missing version in readMessageBegin, old client?"这个错误
Missing version in readMessageBegin, old client?"这个错误【1月更文挑战第22天】【1月更文挑战第107篇】
211 1
no version information available的解决办法
no version information available的解决办法
913 0
|
SQL 数据库
org.flywaydb.core.api.FlywayException: Schema “xxx” contains a failed migration to version 156!
org.flywaydb.core.api.FlywayException: Schema “xxx” contains a failed migration to version 156!
203 0
|
Java 编译器 应用服务中间件
Unsupported major.minor version 52.0(unable to load class com.xxxxxxx.xxx.xx.xx)
Unsupported major.minor version 52.0(unable to load class com.xxxxxxx.xxx.xx.xx)
164 0
Unsupported major.minor version 52.0(unable to load class com.xxxxxxx.xxx.xx.xx)
|
缓存
Error:Could not download ecj.jar : No cached version available for offline mode
Error:Could not download ecj.jar : No cached version available for offline mode
248 0
Error:Could not download ecj.jar : No cached version available for offline mode