Skip to content

Commit b919396

Browse files
authored
Improve the warning in case of versions mismatch between the khiops binaries and the khiops python library (#483)
- rephrase "binaries" to "executables" - add the OS and the environment to the message
1 parent 33a580a commit b919396

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

khiops/core/internals/runner.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,13 +1072,17 @@ def _initialize_khiops_version(self):
10721072
compatible_khiops_version.minor,
10731073
compatible_khiops_version.patch,
10741074
):
1075+
operating_system = platform.system()
1076+
installation_method = _infer_khiops_installation_method()
10751077
warnings.warn(
1076-
f"Khiops version '{self._khiops_version}' does not match "
1077-
f"the Khiops Python library version '{khiops.__version__}' "
1078-
"(different major.minor.patch version). "
1078+
f"Version '{self._khiops_version}' of the Khiops executables "
1079+
"does not match the Khiops Python library version "
1080+
f"'{khiops.__version__}' (different major.minor.patch version). "
10791081
"There may be compatibility errors and "
1080-
"we recommend to update either Khiops binaries or "
1081-
"the Khiops Python library. "
1082+
"we recommend to update either the Khiops "
1083+
f"executables package for your '{operating_system}' operating "
1084+
"system, or the Khiops Python library, "
1085+
f"according to your '{installation_method}' environment. "
10821086
"See https://khiops.org for more information.",
10831087
stacklevel=3,
10841088
)

0 commit comments

Comments
 (0)