distutils.errors.CompileError: command 'C:\\MinGW\\bin\\gcc.exe' failed with exit status 1

Hi, There are many things that can go wrong with PyStan + Windows + Anaconda I recommend following PyStan on Windows — PyStan 2.19.1.1 documentation There might be a need to add distutils.cfg also in to site-packages/setuptools/_distutils folder, not sure. Also use python < 3.9.