我已阅读并按照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 –