From 9cbe0a96290398dbdebc0c26084a9be98a9c7d42 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Tue, 3 Sep 2024 21:54:27 +0200 Subject: [PATCH] More clear error message for pythonbundle too --- easybuild/easyblocks/generic/pythonbundle.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/easybuild/easyblocks/generic/pythonbundle.py b/easybuild/easyblocks/generic/pythonbundle.py index f688b889d4..6a3c533062 100644 --- a/easybuild/easyblocks/generic/pythonbundle.py +++ b/easybuild/easyblocks/generic/pythonbundle.py @@ -112,7 +112,13 @@ def prepare_step(self, *args, **kwargs): if python_cmd: self.log.info("Python command being used: %s", python_cmd) else: - raise EasyBuildError("Failed to pick Python command to use") + if req_py_majver is not None or req_py_minver is not None: + raise EasyBuildError( + "Failed to pick python command that satisfies requirements in the EasyConfigs " + "(req_py_majver = %s, req_py_minver = %s)", req_py_majver, req_py_minver + ) + else: + raise EasyBuildError("Failed to pick Python command to use") if python_cmd: self.all_pylibdirs = get_pylibdirs(python_cmd=python_cmd)