title: Installing gfortran for numpy with homebrew
body: <p>I want to install a working version of <code>numpy</code> using brew. <code>brew install numpy</code> gives the message: </p>
  
  <pre><code>==&gt; python setup.py build --fcompiler=gnu95 install --prefix=/usr/local/Cellar/numpy/1.8.1
  File "/private/tmp/numpy-ncUw/numpy-1.8.1/numpy/distutils/fcompiler/gnu.py", line 197, in get_flags_opt
  v = self.get_version()
  File "/private/tmp/numpy-ncUw/numpy-1.8.1/numpy/distutils/fcompiler/__init__.py", line 434, in get_version
  raise CompilerNotFound()
  numpy.distutils.fcompiler.CompilerNotFound
  </code></pre>
  
  <p><code>brew doctor</code> is okay, so it may actually be a missing fortran compiler problem. Try: <code>brew install gfortran</code></p>
  
  <pre><code>Error: No available formula for gfortran 
  </code></pre>
  
  <p>Huh. from the comments in the brew <a href="https://github.com/Homebrew/homebrew/pull/28855" rel="nofollow">GitHub issue tracker</a>, it looks like gfortran is no longer in brew. Let's try to download gfortran 4.9.0 from <a href="https://gcc.gnu.org/wiki/GFortranBinaries" rel="nofollow">the project website</a> and set <code>FC=\path\to\gfortran</code> so that brew knows to use it</p>
  
  <pre><code>==&gt; Building with an alternative Fortran compiler
  This is unsupported.
  Warning: No Fortran optimization information was provided.  You may want to consider
  setting FCFLAGS and FFLAGS or pass the `--default-fortran-flags` option to
  `brew install` if your compiler is compatible with GCC.
  
  If you like the default optimization level of your compiler, ignore this
  warning.
  ==&gt; Downloading https://downloads.sourceforge.net/project/numpy/NumPy/1.8.1/numpy-1.8.1.tar.gz
  Already downloaded: /Library/Caches/Homebrew/numpy-1.8.1.tar.gz
  ==&gt; python setup.py build --fcompiler=gnu95 install --prefix=/usr/local/Cellar/numpy/1.8.1
  File "/private/tmp/numpy-mrQk/numpy-1.8.1/numpy/distutils/fcompiler/gnu.py", line 197, in get_flags_opt
  v = self.get_version()
  File "/private/tmp/numpy-mrQk/numpy-1.8.1/numpy/distutils/fcompiler/__init__.py", line 434, in get_version
  raise CompilerNotFound()
  numpy.distutils.fcompiler.CompilerNotFound
  </code></pre>
  
  <p>Drat, so brew <em>doesn't</em> want to use a non-default fortran compiler. I'm using OSX 10.9 with llvm installed by default, so am wary about adding a gcc install. When llvm took over, many programs had to be re-compiled, and so changing the default compiler (again) seems dangerous.</p>
  
  <p>Any advice on how to get brew to complete the installation would be very welcome.</p>