[英]Trying to install pymc on Anaconda(python) in Windows 7 and getting weird error?
我想使用Markov Chain Monte Carlo運行一些數據科學算法以進行貝葉斯分析,並嘗試安裝PyMC,但令人沮喪地收到此錯誤...
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
為什么會發生這種情況,我該怎么做才能解決這個問題,而這又不需要我破解python並變得很麻木,而這可能會在以后破壞其他功能?
事實證明,如果我只是去有關的行...
"C:\Anaconda\lib\site-packages\numpy\distutils\fcompiler\gnu.py"
並注釋掉該語句,使其看起來像這樣-
else:
pass #raise NotImplementedError("Only MS compiler supported with gfortran on win64")
PyMC編譯正常。
根據Leon的回答,在我看來,問題似乎是當gnu.py
期待msvc
時,我的默認Fortran編譯器是mingw32
。 出於PyMC的目的, mingw32
可以正常工作,因此,如果您希望削弱條件而不是完全消除條件,請替換
if c_compiler and c_compiler.compiler_type == "msvc":
return []
else:
raise NotImplementedError("Only MS compiler supported with gfortran on win64")
在gnu.py
中
if c_compiler and c_compiler.compiler_type in ["msvc", "mingw32"]:
return []
else:
raise NotImplementedError("Only MS compiler supported with gfortran on win64")
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.