I'm getting a CompileError when running a simple PyStan model in Python:
WARNING:pystan:MSVC compiler is not supported
Traceback (most recent call last): File "C:\Python36\lib\distutils_msvccompiler.py", line 423, in compile self.spawn(args) File "C:\Python36\lib\distutils_msvccompiler.py", line 542, in spawn return super().spawn(cmd) File "C:\Python36\lib\distutils\ccompiler.py", line 909, in spawn spawn(cmd, dry_run=self.dry_run) File "C:\Python36\lib\distutils\spawn.py", line 38, in spawn _spawn_nt(cmd, search_path, dry_run=dry_run) File "C:\Python36\lib\distutils\spawn.py", line 81, in _spawn_nt "command %r failed with exit status %d" % (cmd, rc)) distutils.errors.DistutilsExecError: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 1 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\panormus\venv2\lib\site-packages\IPython\core\interactiveshell.py", line 3296, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "", line 1, in sm = pystan.StanModel(model_code=model) File "C:\panormus\venv2\lib\site-packages\pystan\model.py", line 349, in init build_extension.run() File "C:\Python36\lib\distutils\command\build_ext.py", line 339, in run self.build_extensions() File "C:\Python36\lib\distutils\command\build_ext.py", line 448, in build_extensions self._build_extensions_serial() File "C:\Python36\lib\distutils\command\build_ext.py", line 473, in _build_extensions_serial self.build_extension(ext) File "C:\Python36\lib\distutils\command\build_ext.py", line 533, in build_extension depends=ext.depends) File "C:\Python36\lib\distutils_msvccompiler.py", line 425, in compile raise CompileError(msg) distutils.errors.CompileError: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 1
I've isntalled Pystan using pip (pip install PyStan) on Python 3.6 and am trying to run a simple model (first example here)
I have both MS Visual Studio (not supported) and MinGW-64 (supported) installed on my PC. MinGW works fine to compile similar models using PyMC3, so it seems to me I just need to get my Pystan package to recognize the installation and use that compiler instead. Unfortunately even if that is correct, I am not sure how to do that, can someone help?