Fortran sources but no Fortran compiler found

2019-06-20 17:14发布

问题:

I'm trying to install pyOpt in Python and I got this error :

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

I'm using Anaconda on windows 7, I tried to install "Microsoft Visual C++ Compiler for Python 2.7", but I got the same error.

回答1:

You should install a Fortran compiler, e.g. gfortran (via MinGW/Cygwin on Windows). See here for details. A C++ compiler won't help here.

MinGW includes gfortran as part of the distribution, with Cygwin, you need to install the package gcc-fortran.

After the installation, add the path to its binary to the system PATH.

Alternatively, you can purchase a commercial Fortran Compiler, e.g. from Intel.