import sys
# 检查python版本,如果是低于3.5就退出程序
def check_version():
v = sys.version_info
# print(v) # sys.version_info(major=3, minor=6, micro=5, releaselevel='final', serial=0)
if v.major == 3 and v.minor >= 5:
return
print('Your current python is %d.%d. Please use Python 3.6.' % (v.major, v.minor))
exit(1)
网友评论