Hi,
the following problem was reported by two people using Gloria and is related to an open issue. The repository contains both .stan files as well as the respective compiled .exe files. After the users clone the repository and try to run the model, cmdstanpy attempts to re-compile and fails with the error
ValueError: Failed to compile Stan model ‘..\Lib\site-packages\gloria\stan_models\poisson.stan’. Console:
Command: [‘mingw32-make’, ‘STANCFLAGS+=–filename-in-msg=poisson.stan’, ‘../Lib/site-packages/gloria/stan_models/poisson.exe’]
failed with error [WinError 2] Das System kann die angegebene Datei nicht finden
The German message at the end just states “file not found”.
Indeed, when the users run where mingw32-make they get “file not found” although the toolchain was installed successfully using the command
install_cmdstan(version="2.36.0", compiler=True)
Manual installations of RTools in their virtual environment or globally did not help.
I tried to reproduce this error on three machines, covering Windows 10 and 11 as well as home-networks and company-networks, but never encountered it (similar to the users’ setups). Therefore, I am a little limited on how to debug this issue. Do you have ideas why the build tools are not installed correctly?
On a related note, if you’ll allow me: I thought the re-compilation is triggered as both .stan and .exe have the same last-modified timestamp from the moment the repository was cloned, but this seems to be not true. Can you tell, what actually causes the recompilation?
Thanks for your help!