Fortran 源代码但未找到 Fortran 编译器

Fortran sources but no Fortran compiler found

我正在尝试在 Python 中安装 pyOpt,但出现此错误:

error: library algencan has Fortran sources but no Fortran compiler found

我在 windows 7 上使用 Anaconda,我尝试安装 "Microsoft Visual C++ Compiler for Python 2.7",但我遇到了同样的错误。

您应该安装 Fortran 编译器,例如gfortran(通过 MinGW/Cygwin 在 Windows 上)。有关详细信息,请参阅 here。 C++ 编译器在这里无济于事。

MinGW includes gfortran as part of the distribution, with Cygwin,您需要安装软件包 gcc-fortran

安装完成后,将其二进制文件的路径添加到系统中PATH

或者,您可以购买商业 Fortran 编译器,例如来自英特尔。