diff --git a/hwbench/hwbench.py b/hwbench/hwbench.py index f4cf5bd..3f2fb9a 100755 --- a/hwbench/hwbench.py +++ b/hwbench/hwbench.py @@ -5,6 +5,7 @@ import json import os import pathlib +import platform import time from .bench import benchmarks @@ -12,6 +13,7 @@ from .config import config from .environment import software as env_soft from .environment import hardware as env_hw +from packaging.version import Version from .utils import helpers as h from .tuning import setup as tuning_setup from .utils.hwlogging import init_logging @@ -21,6 +23,13 @@ def main(): if not is_root(): h.fatal("hwbench is not running as effective uid 0.") + # Let's ensure no one is running below the expected python release + min_python_release = "3.9" + if Version(platform.python_version()) < Version(min_python_release): + h.fatal( + f"Current python version {platform.python_version()} is below minimal supported release : {min_python_release}" + ) + out_dir, tuning_out_dir = create_output_directory() args = parse_options()