python - 由于在 Mac OS X 上 brew install gcc 后缺少 fortran 编译器,仍然无法安装 scipy

标签 python macos numpy fortran homebrew

我已阅读并关注 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/

相关文章:

python - Pandas 系列改造

python - urllib2.urlopen 无法使用我的普通 DNS 服务器查找主机名;挖掘等可以

macos - 添加带空格的路径在 OSX El Capitan 中不起作用

python - 如何将 numpy bool 数组打包成一串位?

python - NumPy - 麻烦向量化方法

macos - 从文件中读取并回显的 Bash 脚本

Python邮件脚本并将变量插入html代码

python - pytest-将 fixture 传递给mark.parametrize

python - 如何使用SQLAlchemy在SQLite上创建全文检索索引并进行查询?

objective-c - NSExtensionContext openURL 不适用于 Mac OS X Today Widget