2015-06-09 79 views
2

我的Enthought Canopy python版本是2.7.6,64位。我試圖通過遵循tutorial在Windows 8.1設備上安裝scikits.bvp_solver。gfortran爲scikits.bvp_solver編譯器

我準備好了easy_install,並用gfortran下載了MinGW(here),我試了兩個版本gcc-5.1.0-64.exegcc-5.1.0-32.exe

然後我繼續第二個步驟,使用從python setup.py config --compiler=mingw32 build --compiler=mingw32 install源即編譯,從CMD該錯誤消息是

File "c:\users\xxx\enthought\canopy\user\lib\site-packages\ numpy\distutils\fcompiler\gnu.py", line 337, in get_libraries raise NotImplementedError("Only MS compiler supported with gfortran on win64 ")

NotImplementedError: Only MS compiler supported with gfortran on win64

我指定系統路徑是C:\Rtools\gcc-4.6.3\binC:\Rtool\gcc-4.6.3\libexec\gcc\x86_64-pc-mingw32\5.1.0

作爲谷歌組中的某人向我提到,這應該是與numpy相關的問題,我應該看看這個note,我的錯誤代碼與他的幾乎相同。但我不知道他是如何解決他的問題的。因此,歡迎任何意見。

enter image description here

回答

0

首先,如果你做了沒有準備好,拿到包scikits.bvp_solver爲好。他們推薦easy_install在the tutorial link for scikits.bvp_solver,但你可能必須設置easy_install,這取決於你的python配置。

接下來,根據您的python發行版是64位還是32位,選擇64位或32位mingw gfortran編譯器進行匹配。

接下來,你確定你正確指定了setup.py文件的路徑嗎?

要麼

1)cd到含有目錄setup.py(這可能在系統上各不相同,例如C:\下面directory_where_it_is只是一個佔位符)

cd C:\directory_where_it_is

鍵入之前,

python setup.py config --compiler=mingw32 build --compiler=mingw32 install

2)指定的目錄,其中設置的.py是在命令行,如果從其他目錄

python C:\directory_where_it_is\setup.py config --compiler=mingw32 build --compiler=mingw32 install

最後運行的提示,可能有必要簡單地註釋掉在setup.py該異常的代碼,並試圖構建,以類似的方式來程序in this previous post

+0

非常感謝。由於我只安裝了'gcc-5.1.0-64.exe',我該如何找到setup.py文件,它是如何來的? –

+0

我從包中得到了setup.py,然後按照你的指示,然後我收到錯誤消息'NotImplementedError:只有ms編譯器在win64上支持gfortran'。你有什麼主意嗎?我安裝了'MinGW with gfortran',它在我的系統路徑中。 –

+0

我試圖使用32位版本,但收到相同的錯誤消息。 –