I want to run some data science algorithms using Markov Chain Monte Carlo for Bayesian analysis and am trying to install PyMC but am frustratingly getting this error...
File "C:\Anaconda\lib\site-packages\numpy\distutils\fcompiler\gnu.py", line 333, in get_libraries
raise NotImplementedError("Only MS compiler supported with gfortran on win64")
NotImplementedError: Only MS compiler supported with gfortran on win64
Why would this happen and what can I do to solve it that doesnt require me hacking up python and apparently numpy that might screw other things up at a later time?
It turns out if I just go to the line in question ...
"C:\Anaconda\lib\site-packages\numpy\distutils\fcompiler\gnu.py"
and comment out the statement so it looks like this -
else:
pass #raise NotImplementedError("Only MS compiler supported with gfortran on win64")
PyMC compiles just fine.
Following on from Leon's answer, in my case it seems the problem was that my default Fortran compiler was mingw32
when gnu.py
was expecting msvc
. For PyMC's purposes mingw32
works fine, so if you'd prefer to weaken the conditional rather than eliminate it entirely, replace
if c_compiler and c_compiler.compiler_type == "msvc":
return []
else:
raise NotImplementedError("Only MS compiler supported with gfortran on win64")
in gnu.py
with
if c_compiler and c_compiler.compiler_type in ["msvc", "mingw32"]:
return []
else:
raise NotImplementedError("Only MS compiler supported with gfortran on win64")