def check_python_version()

in linux/install_gpu_driver.py [0:0]


def check_python_version():
    """
    Makes sure that the script is run with Python 3.6 or newer.
    """
    if sys.version_info.major == 3 and sys.version_info.minor >= 6:
        return
    version = "{}.{}".format(sys.version_info.major, sys.version_info.minor)
    raise RuntimeError(
        "Unsupported Python version {}. "
        "Supported versions: 3.6 - 3.11".format(version)
    )