【发布时间】:2015-04-01 20:32:58
【问题描述】:
我试着跑
pip install --upgrade scipy
但是我得到了一堆错误:
running build_clib
customize UnixCCompiler
customize UnixCCompiler using build_clib
customize Gnu95FCompiler
Could not locate executable gfortran
Could not locate executable f95
customize NAGFCompiler
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
看来我需要安装一个fortran编译器(不知道这是否能解决我所有的问题)。那我试试
brew install gcc
然后我收到一条警告:
gcc-4.9.2_1 already installed, it's just not linked
然后我尝试链接它。
brew link gcc
然后我明白了
Error: Could not symlink bin/c++-4.9
Target /usr/local/bin/c++-4.9
is a symlink belonging to gcc49. You can unlink it:
brew unlink gcc49
我应该这样做吗?我想要 gcc49,因为我在 mac 上,并且我使用 gcc49 来获得 openmp 支持(如果我没记错的话,它会在我做任何 NVIDIA 的事情时使用)。取消链接gcc49和链接gcc会有什么后果?
【问题讨论】:
标签: python-2.7 gcc scipy homebrew gfortran