【发布时间】:2013-01-27 02:17:03
【问题描述】:
我在我的 mac os x 上成功地为 python 2.7.3 构建/安装了 NumPy。 现在我也想构建/安装 scipy。我是从 git hub 下载的。 进了目录。运行 python setup.py build ,它似乎可以正常工作,直到遇到此错误:
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
我以为我已经为 NumPy 安装了 Fortran...你猜不是吗?怎么下载?
【问题讨论】:
-
您需要最新版本吗?为什么不使用 easy_install 或 pip?
-
我在安装 NumPy 时尝试了 pip,但我很困惑,我下载了自制软件,之后 Numpy 就可以工作了。
-
让我说:如果你打算用 Python 做任何事情,你可能想弄清楚。
-
您使用的是 Apple 预装的 Python,还是其他的(python.org、Homebrew 等)?不同情况下的答案是不同的(尽管我很确定每种情况都有一个 dup)。
-
另外,您是否真的需要从其他来源安装的 Python 2.7.3,而不是 Apple 预装的 2.7.2?因为如果你卸载它并在你的道路上只使用一个 Python 2.7,生活会轻松很多。
标签: python macos python-2.7 fortran scipy