我已阅读并关注 this answer安装 scipy/numpy/theano。但是,在 brew install gcc 之后,它仍然因缺少 Fortran 编译器的相同错误而失败。虽然 HomeBrew 安装了 gcc-4.8,但它没有安装任何 gfortran 或 g95 命令。我认为 gfortran 可能只是一个 synonymy gcc,然后我创建一个符号链接(symbolic link)
$ 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
我还应该做什么?
最佳答案
以下内容对我有用:
sudo apt-get install gfortran
在我的系统上:
Ubuntu 15.10(Linux 4.2.0-19-generic#23-Ubuntu x86_64 x86_64 x86_64 GNU/Linux)
关于python - 由于在 Mac OS X 上 brew install gcc 后缺少 fortran 编译器,仍然无法安装 scipy,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29586487/