Fortran sources but no Fortran compiler found

mounir ben salem picture mounir ben salem · Mar 27, 2016 · Viewed 15.9k times · Source

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.

Answer

Alexander Vogt picture Alexander Vogt · Mar 27, 2016

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.