version_utils.py 382 B

123456789101112
  1. import sys
  2. def check_supported_python_version():
  3. python_version = sys.version_info
  4. if not ((3, 11) <= python_version < (3, 13)):
  5. print(
  6. "Aborted to launch the service "
  7. f" with unsupported Python version {python_version.major}.{python_version.minor}."
  8. " Please ensure Python 3.11 or 3.12."
  9. )
  10. raise SystemExit(1)