Hey guys!
I’m trying to run the following on my Google Colab and it results with the error “command ‘gcc-10’ failed: No such file or directory”:
ctrl_code1 = '''
data {
int N; // number of observations
int K1; // number of positive predictors
int K2; // number of positive/negative predictors
real max_intercept; // restrict the intercept to be less than the minimum y
matrix[N, K1] X1;
matrix[N, K2] X2;
vector[N] y;
}
parameters {
vector[K1] beta1; // regression coefficients for X1 (positive)
vector[K2] beta2; // regression coefficients for X2
real alpha; // intercept
real noise_var; // residual variance
}
model {
// Define the priors
beta1 ~ normal(0, 1);
beta2 ~ normal(0, 1);
noise_var ~ inv_gamma(0.05, 0.05 * 0.01);
// The likelihood
y ~ normal(X1*beta1 + X2*beta2 + alpha, sqrt(noise_var));
}
'''
m1 = stan.build(ctrl_code1, data = ctrl_data, random_seed=1)
#fit1 = sm1.sample(num_chains=4, num_samples=2000)
#fit1_result = fit["eta"] # array with shape (8, 4000)
Any ideas how to fix this?
- OS Windows 10
- Google Colab Python 3
- latest PyStan version installed
Full error text:
Exception while building model extension module:
CompileError(DistutilsExecError("command 'gcc-10' failed: No such file or directory"))
, traceback: `[’ File “/usr/local/lib/python3.10/dist-packages/httpstan/views.py”, line 114, in handle_create_model\n compiler_output = await httpstan.models.build_services_extension_module(program_code)\n’, ’ File “/usr/local/lib/python3.10/dist-packages/httpstan/models.py”, line 172, in build_services_extension_module\n compiler_output = await asyncio.get_running_loop().run_in_executor(\n’, ’ File “/usr/lib/python3.10/asyncio/futures.py”, line 285, in await\n yield self # This tells Task to wait for completion.\n’, ’ File “/usr/lib/python3.10/asyncio/tasks.py”, line 304, in __wakeup\n future.result()\n’, ’ File “/usr/lib/python3.10/asyncio/futures.py”, line 201, in result\n raise self._exception.with_traceback(self._exception_tb)\n’, ’ File “/usr/lib/python3.10/concurrent/futures/thread.py”, line 58, in run\n result = self.fn(*self.args, **self.kwargs)\n’, ’ File “/usr/local/lib/python3.10/dist-packages/httpstan/build_ext.py”, line 86, in run_build_ext\n build_extension.run()\n’, ’ File “/usr/local/lib/python3.10/dist-packages/setuptools/command/build_ext.py”, line 84, in run\n _build_ext.run(self)\n’, ’ File “/usr/local/lib/python3.10/dist-packages/setuptools/_distutils/command/build_ext.py”, line 345, in run\n self.build_extensions()\n’, ’ File "/usr/local/lib/python3…