-
-
Notifications
You must be signed in to change notification settings - Fork 81
Lines 417-424 of utils/cmdstan.py are as follows:
logger.info('Add C++ toolchain to $PATH: %s', toolchain_root)
os.environ['PATH'] = ';'.join(
list(
OrderedDict.fromkeys(
[compiler_path, tool_path] + os.getenv('PATH', '').split(';')
)
)
)
That is, during installation, cmdstan.py logs "Add C++ toolchain to $PATH: toolchain_root". Then it (sort of, see below) adds two different addresses to PATH: compiler_path and tool_path.
I have two questions:
- Are the paths added to
PATHintended to appear in the logger output? - Is the modification intended to be permanent, or just last for the duration of the installation script?
On Windows, modifying os.environ does not change PATH for other processes (including, say, other cmdstanpy scripts), and certainly does not persist across logon/logoff events. Instead, one must use the winreg module to modify the registry key (for per-user changes) HKCU/Environment or (for all users) HKLM/Environment.
All reactions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment