MCPcopy Create free account
hub / github.com/WECENG/ticket-purchase / check_python_version

Function check_python_version

damai/check_environment.py:168–178  ·  view source on GitHub ↗

检查 Python 版本

()

Source from the content-addressed store, hash-verified

166
167
168def check_python_version():
169 """检查 Python 版本"""
170 print("Python 版本检查...")
171 version = sys.version_info
172 print(f" 当前版本: {version.major}.{version.minor}.{version.micro}")
173
174 if version.major < 3 or (version.major == 3 and version.minor < 7):
175 print(" ✗ 需要 Python 3.7 或更高版本")
176 return False
177 print(" ✓ Python 版本符合要求\n")
178 return True
179
180
181def check_dependencies():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected