Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Still can't install scipy due to missing fortran compiler after brew install gcc on Mac OS X

I have read and followed this answer to install scipy/numpy/theano. However, it still failed on the same error of missing Fortran compiler after brew install gcc. While HomeBrew installed the gcc-4.8, it didn't install any gfortran or g95 commands. I figure gfortran may be just a synonymy of gcc, then I create a symlink

$ cd /usr/local/bin $ ln -s gcc-4.8 gfortran $ pip install scipy 

Then it detects the gfortran command but still complaining no Fortran compiler

customize Gnu95FCompiler Found executable /usr/local/bin/gfortran customize NAGFCompiler Could not locate executable f95 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 

What else should I do?

like image 821
teddy Avatar asked Apr 12 '15 06:04

teddy


People also ask

Can you run Fortran on Mac?

The OS X Fortran compiler supports a full range of project targets including command-line programs and GUI based applications. It provides a complete 64-bit macOS/OS X Fortran compiler solution and supports mixed language development by interfacing with Apple's Xcode C/C++ compiler.


1 Answers

The following worked for me:

sudo apt-get install gfortran

on my system:

Ubuntu 15.10 (Linux 4.2.0-19-generic #23-Ubuntu x86_64 x86_64 x86_64 GNU/Linux)

like image 128
Patricio Astudillo Avatar answered Sep 27 '22 18:09

Patricio Astudillo