When testing pystan-2.19.1.1 via Anaconda on Windows 10, pystan defaults to MSVC compiler and not gcc mingw-5.3.0 (installed from -c msys). This is part of the testing I’m doing for pybrms@ahartikainen
import pystan
model_code = 'parameters {real y;} model {y ~ normal(0,1);}'
model = pystan.StanModel(model_code=model_code)
Please provide this additional information in addition to your question:
Operating System: Window 10
Python Version: 3.7.0
PyStan Version: 2.19.1.1
Compiler/Toolkit: gcc-5.3.0 but this is not accessed
@ahartikainen Thanks for the feedback and directions. I will test and let you know how it goes. So that I understood you correctly - “Make sure that gcc compiler is shown in cmd” - I usually test the compiler by running g++ -v. Is this what you are referring to?
One problem might be running specific python from “wrong” environment (e.g. jupyter/spyder(?)/pycharm have options to change python env but this does not change the PATH info → gcc is not found
@ahartikainen thanks for the confirmation. I had made that mistake a few times, but now launch jupyter from the environment command prompt. Prior to testing in jupyter, I always test the basic pystan at the command prompt itself.
I will be testing this today and update here. Thanks again for your time. I’m hoping to create documentation for different tools within the stan family for installation and usage for first time users in the Windows space.
@ahartikainen the steps you laid out worked perfectly to get Pystan=2.19.1.1 working nicely on Windows using gcc-5.3.0. Thank you! I could run the 8schools example using a Jupyter notebook
I will now check to see if I can build this further for pybrms with rpy2 and brms
@ahartikainen Further success with installing r-base-4.1.2rpy2-3.4.5 and pybrms-0.0.33 and running the model using the epilepsy data from within brms R package