Skip to content

Commit 7245892

Browse files
authored
Merge pull request #480 from stan-dev/cmdstan-missing-message
Clarify cmdstan installation issue
2 parents da8a86c + 8835b05 commit 7245892

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

cmdstanpy/utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,14 @@ def cmdstan_path() -> str:
161161
cmdstan_dir = os.path.expanduser(os.path.join('~', _DOT_CMDSTAN))
162162
if not os.path.exists(cmdstan_dir):
163163
raise ValueError(
164-
'No CmdStan installation found, run "install_cmdstan".'
164+
'No CmdStan installation found, run "install_cmdstan" or'
165+
' (re)activate your conda environment!'
165166
)
166167
latest_cmdstan = get_latest_cmdstan(cmdstan_dir)
167168
if latest_cmdstan is None:
168169
raise ValueError(
169-
'No CmdStan installation found, run "install_cmdstan".'
170+
'No CmdStan installation found, run "install_cmdstan" or'
171+
' (re)activate your conda environment!'
170172
)
171173
cmdstan = os.path.join(cmdstan_dir, latest_cmdstan)
172174
os.environ['CMDSTAN'] = cmdstan

docsrc/installation.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ We recommend creating a new environment for CmdStan[Py]:
2020
2121
conda create -n cmdstan -c conda-forge cmdstanpy
2222
23-
but installation is possible in an existing environment:
23+
but installation is possible in an existing environment
24+
(Note: you must re-activate the environment after running this command!):
2425

2526
.. code-block:: bash
2627

0 commit comments

Comments
 (0)