You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 PATH intended 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.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Lines 417-424 of utils/cmdstan.py are as follows:
That is, during installation, cmdstan.py logs "Add C++ toolchain to $PATH:
toolchain_root". Then it (sort of, see below) adds two different addresses toPATH:compiler_pathandtool_path.I have two questions:
PATHintended to appear in the logger output?On Windows, modifying
os.environdoes not changePATHfor other processes (including, say, other cmdstanpy scripts), and certainly does not persist across logon/logoff events. Instead, one must use thewinregmodule to modify the registry key (for per-user changes)HKCU/Environmentor (for all users)HKLM/Environment.Beta Was this translation helpful? Give feedback.
All reactions