diff --git a/khiops/core/internals/runner.py b/khiops/core/internals/runner.py index e9d7cb71..9edefce5 100644 --- a/khiops/core/internals/runner.py +++ b/khiops/core/internals/runner.py @@ -1019,10 +1019,20 @@ def _initialize_khiops_environment(self): ) as khiops_env_process: stdout, stderr = khiops_env_process.communicate() if khiops_env_process.returncode != 0: - raise KhiopsEnvironmentError( + error_message = ( "Error initializing the environment for Khiops from the " f"{khiops_env_path} script. Contents of stderr:\n{stderr}" ) + if platform.system() == "Windows": + # Give the user a hint to resolve the issue on Windows + error_message += ( + "\nThe issue may be caused by Khiops being installed " + "in a location restricted by your organization's IT " + "security policy. In this case, try re-installing " + "the Khiops Python Library in a recommended directory " + "or run your IDE or terminal as an administrator." + ) + raise KhiopsEnvironmentError(error_message) for line in stdout.split("\n"): tokens = line.rstrip().split(maxsplit=1) if len(tokens) == 2: