Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion khiops/core/internals/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading