我已閱讀並按照this answer安裝scipy/numpy/theano。但是,在brew安裝gcc之後,它仍然失敗了Fortran編譯器缺少的錯誤。雖然HomeBrew安裝了gcc-4.8,但它沒有安裝任何gfortran或g95命令。我想gfortran可能只是一個gcc的synonymy,然後創建一個符號鏈接仍然無法安裝scipy,因爲在Mac OS X上安裝gcc後缺少fortran編譯器
$ cd /usr/local/bin
$ ln -s gcc-4.8 gfortran
$ pip install scipy
然後檢測gfortran命令,但仍抱怨沒有Fortran編譯
customize Gnu95FCompiler
Found executable /usr/local/bin/gfortran
customize NAGFCompiler
Could not locate executable f95
customize AbsoftFCompiler
Could not locate executable f90
Could not locate executable f77
customize IBMFCompiler
Could not locate executable xlf90
Could not locate executable xlf
customize IntelFCompiler
Could not locate executable ifort
Could not locate executable ifc
customize GnuFCompiler
Could not locate executable g77
customize G95FCompiler
Could not locate executable g95
customize PGroupFCompiler
Could not locate executable pgfortran
don't know how to compile Fortran code on platform 'posix'
building 'dfftpack' library
error: library dfftpack has Fortran sources but no Fortran compiler found
還有什麼應該怎麼辦?
你真的想編譯'scipy'或正在使用預編譯的版本附帶'anaconda'一個選擇? – cel
gfortran命令本身就像gcc那樣調用一個常見的東西,但是之後它會調用Fortran前端,並且必須安裝它。符號鏈接gfortran→gcc是不夠的。 –
你做過'brew install gcc'嗎? http://stackoverflow.com/questions/26919450/can-not-install-gfortran-via-homebrew –