pythonpystan

Pystan -- Library\\mingw-w64\\bin\\gcc.exe' failed with exit code 1


I would like to test orbit-ml package but I have same issues with pystan My settings are: Windows10, Anacaonda, Python 3.7 (or 3.8) When I run this demo code:

import pystan
model_code = 'parameters {real y;} model {y ~ normal(0,1);}'
model = pystan.StanModel(model_code=model_code)
y = model.sampling().extract()['y']
y.mean()  # with luck the result will be near 0

I had this error: CompileError: command 'C:\Users\XXX\Anaconda3\envs\orbit-ml-py37\Library\mingw-w64\bin\gcc.exe' failed with exit code 1

I installed orbit-ml following the official documentantion. I had problem with pystan (MSVC compiler is not supported) and I followed step by step the documentation link

After that no warning on MSVC but the code stops with this error:

CompileError: command 'C:\Users\XXX\Anaconda3\envs\orbit-ml-py37\Library\mingw-w64\bin\gcc.exe' failed with exit code 1

I don't understand. Do you have any suggestions? All the best


Solution

  • There seems to be some dependency related problem. Solving this could be a hard thing. You can refer this Documentation

    If you want to get started, try the following

    Observations

    From your code snippet, I have observed the following:

    1. import pystan does not work in recent versions (as per reference)
    2. There could be issues with StanModel in the library. Check reference

    Suggestions

    Few alternatives to get to started with other approaches by bypassing the process are:

    1. Try google colab to get started. Go to Google colab and experiment there
    2. Try a linux/ubuntu VM using docker and install there.

    enter image description here