I am trying to run a Stan model on python (using cmdstanpy) on a Mac computer. The error I get is the following: CmdStan’s precompiled header (PCH) files may need to be rebuilt.Please run cmdstanpy.rebuild_cmdstan().
When I try to rebuild it, I get the following error: No CmdStan installation found, run command "install_cmdstan"or (re)activate your conda environment!
It seems that cmdstan(py) is not installed. However, it is indeed installed and the examples (e.g., the standard Bernoulli example) work just fine.
The problem lies in the make tool. Whereas on windows it is possible to specify the custom make tool, this is not the case on Mac. As a result, when trying to run the model (before trying to rebuild cmdstan), I get this error message: error: PCH file uses an older PCH format that is no longer supported
1 error generated.
make: *** [/Users/x/Desktop/cmdstan-2.31.0/examples/model1] Error 1
Command [‘make’, ‘/Users/x/Desktop/cmdstan-2.31.0/examples/model1’]
error during processing No such file or directory
How can I solve this issue? Is there a (simple) way to set a custom make tool on a Mac?
- Operating System: Mac IOS
- CmdStan Version: 2.31.0
- Compiler/Toolkit: Python (Pycharm)