stan-dev/cmdstanpy

install_cmdstan fails on MacOS

fonnesbeck opened this issue · 3 comments

Summary:

Running install_cmdstan after installing cmdstanpy results in an ImportError

Description:

Here is the traceback:

> install_cmdstan
Traceback (most recent call last):
  File "/Users/cfonnesbeck/mambaforge/envs/pie/bin/install_cmdstan", line 6, in <module>
    from cmdstanpy.install_cmdstan import main
ImportError: cannot import name 'main' from 'cmdstanpy.install_cmdstan' (/Users/cfonnesbeck/mambaforge/envs/pie/lib/python3.10/site-packages/cmdstanpy/install_cmdstan.py)

Additional Information:

cmdstanpy was installed via conda

Current Version:

python: 3.10.9 | packaged by conda-forge | (main, Feb  2 2023, 20:26:08) [Clang 14.0.6 ]
python-bits: 64
OS: Darwin
OS-release: 22.5.0
machine: arm64
processor: arm
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: ('en_US', 'UTF-8')
cmdstan_folder: /Users/cfonnesbeck/mambaforge/envs/pie/bin/cmdstan
cmdstan: (2, 32)
cmdstanpy: 1.1.0
pandas: 2.0.3
xarray: 2023.7.0
tqdm: 4.65.0
numpy: 1.24.3

FWIW, this also fails on a Linux machine:

$ install_cmdstan
Traceback (most recent call last):
  File "/home/cfonnesbeck_phillies_com/mambaforge/envs/pymc/bin/install_cmdstan", line 6, in <module>
    from cmdstanpy.install_cmdstan import main
ImportError: cannot import name 'main' from 'cmdstanpy.install_cmdstan' (/home/cfonnesbeck_phillies_com/mambaforge/envs/pymc/lib/python3.11/site-packages/cmdstanpy/install_cmdstan.py)

If you installed cmdstanpy via conda, it should have also installed cmdstan as part of that

Got it, thanks.