diff --git a/bench/bench.py b/bench/bench.py index d94c9f70..11ed67d4 100644 --- a/bench/bench.py +++ b/bench/bench.py @@ -6,6 +6,7 @@ import shutil import json import sys import logging +from glob import glob from typing import List, MutableSequence, TYPE_CHECKING, Union # imports - module imports @@ -71,6 +72,11 @@ class Bench(Base, Validator): @property def python(self) -> str: + existing_python_bins = glob(f"{self.name}/env/bin/python*") + + if existing_python_bins: + return existing_python_bins[0] + return get_env_cmd("python", bench_path=self.name) @property diff --git a/bench/utils/bench.py b/bench/utils/bench.py index c0263657..999915ad 100644 --- a/bench/utils/bench.py +++ b/bench/utils/bench.py @@ -40,7 +40,7 @@ def get_venv_path(verbose=False, python="python3"): if is_venv_installed: return f"{python} -m venv" else: - log("virtualenv cannot be found", level=2) + log("venv cannot be found", level=2) def update_node_packages(bench_path=".", apps=None):