After initial learning bump, conda is quite pleasent to use. (basically you have independent directories that contain all python stuff, and calling source activate envname
/(or newer conda installations give you option to call conda activate envname
) will make the envfolder the main (updates $PATH for bin and python folders).
To see all the environments, you can use conda env list
.
pbadel:
using CmdStan
We also have python interface to CmdStan called CmdStanPy https://cmdstanpy.readthedocs.io/en/latest/
And ArviZ supports both CmdStan/CmdStanPy too, so you can do visualizations and diagnostics with it, if you want.
https://arviz-devs.github.io/arviz/index.html
But I don’t think your PyStan is failing due your Python setup.
The problem is with your compiler and this error should also manifest itself with CmdStan too.
So, I think you should try to fix the header issue with the macOS compiler.
See the following resources
For the first time, getting rstan to work on Windows seems to be easier than getting it to work on the Mojave version Mac OS X. Mojave seems to affect different people in different ways. Here are the things I would try if rstan is not working:
Make sure you have opened Xcode once via Spotlight to accept its license
If that doesn’t work but you have a /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14. pkg, install that so it puts C++ headers back in /usr/include
I…
Hi everyone,
I recently updated my MacOS software to Mojave and since I have not been able to use Stan with R. When I try loading the ‘rstan’ package, I get the following error:
library(rstan)
Loading required package: StanHeaders
Error in value[3L] :
Package ‘StanHeaders’ version 2.17.2 cannot be unloaded:
Error in unloadNamespace(package) : namespace ‘StanHeaders’ is imported by ‘rstan’ so cannot be unloaded
I have tried to look at re-installing RStan, but when I execute
pkgbuild::ha…
Hi,
First, use pip version pip install pystan and try compiling again.
There seems to be similar problems with mojave
Run this (in pandas issue) and try again:
/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
If that doesn’t work, then remove xcode and commandline tools and do the fresh install.
Run all these tests in fresh conda-env.
Install PyStan from source to a new conda env.
conda create -n stan_env python=3.7 numpy cython
conda activate sta…
Make sure you have opened Xcode once via Spotlight to accept its license
/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
install that so it puts C++ headers back in /usr/include
xcode-select --install