title: error: library dfftpack has Fortran sources but no Fortran compiler
body: <p>I have <a href="https://stackoverflow.com/a/26964891/2734863">upgraded pip</a> after the error and it didn't change, I have no issues <a href="https://stackoverflow.com/questions/14821297/scipy-build-install-mac-osx">installing scipy</a> locally, I have <a href="https://stackoverflow.com/a/34676103/2734863">gcc 4.8</a>, I have the <a href="https://stackoverflow.com/a/34038311/2734863">latest version of gfortran</a> (4.8.4), I tried this <a href="https://stackoverflow.com/a/29527939/2734863">fancy gfortran installation</a> which seems to be specific to Ubuntu and it did install something, I tried <a href="https://stackoverflow.com/a/21520601/2734863">git pull heroku master</a> but get <code>fatal: Coundn't find remote ref master,</code> adding the <a href="https://stackoverflow.com/a/9794458/2734863">--rebase option</a> returns the same error. This makes sense I think since I used the following to delete all apps on Heroku so there shouldn't be anything to pull: <code>for app in $(heroku apps); do heroku apps:destroy --app $app --confirm $app; done</code></p>
  
  <p>The links all link to solutions that purportedly work for what appears to my problem as well or highly similar</p>
  
  <p>I'd like to note that <em>my app has been deployed successfully before</em> many months ago. Changes I made include: I modified the code a bit - compiles and runs locally, I want to now add a ~500MB .tiff as well to the site so used <code>git add</code> and committed it as if it were any other file. I read somewhere that users have 200MB what I believe is called slug space and GB upon GB of space in a tmp folder so I didn't think space would be an issue. I also reinitialized git as I needed to work from a different directory, but since I deleted all the apps from Heroku I figured no merges would need to be performed (trying to have a fresh start) </p>
  
  <p><strong>Command:</strong></p>
  
  <pre><code>git push heroku master -f
  </code></pre>
  
  <p><strong>Result with the first error message I saw close to the top:</strong></p>
  
  <pre><code>remote:          customize IntelFCompiler
  remote:          Could not locate executable ifort
  remote:          Could not locate executable ifc
  remote:          customize LaheyFCompiler
  remote:          Could not locate executable lf95
  remote:          customize PGroupFCompiler
  remote:          Could not locate executable pgfortran
  remote:          customize AbsoftFCompiler
  remote:          Could not locate executable f90
  remote:          Could not locate executable f77
  remote:          customize NAGFCompiler
  remote:          customize VastFCompiler
  remote:          customize CompaqFCompiler
  remote:          Could not locate executable fort
  remote:          customize IntelItaniumFCompiler
  remote:          Could not locate executable efort
  remote:          Could not locate executable efc
  remote:          customize IntelEM64TFCompiler
  remote:          customize GnuFCompiler
  remote:          Could not locate executable g77
  remote:          customize G95FCompiler
  remote:          Could not locate executable g95
  remote:          customize PathScaleFCompiler
  remote:          Could not locate executable pathf95
  remote:          don't know how to compile Fortran code on platform 'posix'
  remote:          building 'dfftpack' library
  remote:          error: library dfftpack has Fortran sources but no Fortran compiler found
  remote:          
  remote:          ----------------------------------------
  remote:          Running setup.py clean for scipy
  remote:          Running setup.py bdist_wheel for matplotlib: started
  remote:          Running setup.py bdist_wheel for matplotlib: finished with status 'done'
  remote:          Stored in directory: /app/.cache/pip/wheels/94/22/76/2f17479b2ff90623041a1ce6b6c2b88bcd68e4a24dd2456d9f
  remote:          Running setup.py bdist_wheel for parmap: started
  remote:          Running setup.py bdist_wheel for parmap: finished with status 'done'
  remote:          Stored in directory: /app/.cache/pip/wheels/74/fd/cf/7d03cee9ca1d249a13c3b68e2743dd2127b4c123f632a4a846
  remote:          Running setup.py bdist_wheel for DataSpyre: started
  remote:          Running setup.py bdist_wheel for DataSpyre: finished with status 'done'
  remote:          Stored in directory: /app/.cache/pip/wheels/b0/ad/2c/f854c06dd738eec9ba91b4798c871cf078cc699bf7b153988c
  remote:          Running setup.py bdist_wheel for pandas: started
  remote:          Running setup.py bdist_wheel for pandas: still running...
  remote:          Running setup.py bdist_wheel for pandas: still running...
  remote:          Running setup.py bdist_wheel for pandas: finished with status 'done'
  remote:          Stored in directory: /app/.cache/pip/wheels/21/92/81/0259bc54d3f52003b6b94825569abf890237f20c2122a2af4f
  remote:          Running setup.py bdist_wheel for cherrypy: started
  remote:          Running setup.py bdist_wheel for cherrypy: finished with status 'done'
  remote:          Stored in directory: /app/.cache/pip/wheels/b3/2e/4a/4d94757218472574adad901b155f3fcbd5290a86da272543c9
  remote:          Running setup.py bdist_wheel for MarkupSafe: started
  remote:          Running setup.py bdist_wheel for MarkupSafe: finished with status 'done'
  remote:          Stored in directory: /app/.cache/pip/wheels/94/a7/79/f79a998b64c1281cb99fa9bbd33cfc9b8b5775f438218d17a7
  remote:        Successfully built matplotlib parmap DataSpyre pandas cherrypy MarkupSafe
  remote:        Failed to build scipy
  remote:        Installing collected packages: scipy, six, python-dateutil, pytz, cycler, pyparsing, matplotlib, parmap, pandas, cherrypy, MarkupSafe, jinja2, DataSpyre
  remote:          Running setup.py install for scipy: started
  remote:            Running setup.py install for scipy: finished with status 'error'
  remote:            Complete output from command /app/.heroku/miniconda/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-IpiQEw/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-09yK_9-record/install-record.txt --single-version-externally-managed --compile:
  remote:            lapack_opt_info:
  remote:            openblas_lapack_info:
  remote:              libraries openblas not found in ['/app/.heroku/miniconda/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
  remote:              NOT AVAILABLE
  remote:            
  remote:            lapack_mkl_info:
  remote:            mkl_info:
  remote:            /app/.heroku/miniconda/lib/python2.7/site-packages/numpy/distutils/system_info.py:635: UserWarning: Specified path  is invalid.
  remote:              warnings.warn('Specified path %s is invalid.' % d)
  remote:              FOUND:
  remote:                libraries = ['mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'iomp5', 'pthread']
  remote:                library_dirs = ['/app/.heroku/miniconda/lib']
  remote:                define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
  remote:                include_dirs = ['/app/.heroku/miniconda/include']
  remote:            
  remote:              FOUND:
  remote:                libraries = ['mkl_lapack95_lp64', 'mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'iomp5', 'pthread']
  remote:                library_dirs = ['/app/.heroku/miniconda/lib']
  remote:                define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
  remote:                include_dirs = ['/app/.heroku/miniconda/include']
  remote:            
  remote:              FOUND:
  remote:                libraries = ['mkl_lapack95_lp64', 'mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'iomp5', 'pthread']
  remote:                library_dirs = ['/app/.heroku/miniconda/lib']
  remote:                define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
  remote:                include_dirs = ['/app/.heroku/miniconda/include']
  remote:            
  remote:            Running from scipy source directory.
  remote:            Splitting linalg.interpolative Fortran source files
  remote:            /app/.heroku/miniconda/lib/python2.7/site-packages/numpy/distutils/system_info.py:635: UserWarning: Specified path /usr/local/include/python2.7 is invalid.
  remote:              warnings.warn('Specified path %s is invalid.' % d)
  remote:            blas_opt_info:
  remote:            blas_mkl_info:
  remote:              FOUND:
  remote:                libraries = ['mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'iomp5', 'pthread']
  remote:                library_dirs = ['/app/.heroku/miniconda/lib']
  remote:                define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
  remote:                include_dirs = ['/app/.heroku/miniconda/include']
  remote:            
  remote:              FOUND:
  remote:                libraries = ['mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'iomp5', 'pthread']
  remote:                library_dirs = ['/app/.heroku/miniconda/lib']
  remote:                define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
  remote:                include_dirs = ['/app/.heroku/miniconda/include']
  remote:            
  remote:            running install
  remote:            running build
  remote:            running config_cc
  remote:            unifing config_cc, config, build_clib, build_ext, build commands --compiler options
  remote:            running config_fc
  remote:            unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
  remote:            running build_src
  remote:            build_src
  remote:            building py_modules sources
  remote:            building library "dfftpack" sources
  remote:            building library "fftpack" sources
  remote:            building library "mach" sources
  remote:            building library "quadpack" sources
  remote:            building library "odepack" sources
  remote:            building library "dop" sources
  remote:            building library "fitpack" sources
  remote:            building library "fwrappers" sources
  remote:            building library "odrpack" sources
  remote:            building library "minpack" sources
  remote:            building library "rootfind" sources
  remote:            building library "superlu_src" sources
  remote:            building library "arpack_scipy" sources
  remote:            building library "sc_c_misc" sources
  remote:            building library "sc_cephes" sources
  remote:            building library "sc_mach" sources
  remote:            building library "sc_amos" sources
  remote:            building library "sc_cdf" sources
  remote:            building library "sc_specfun" sources
  remote:            building library "statlib" sources
  remote:            building extension "scipy.cluster._vq" sources
  remote:            building extension "scipy.cluster._hierarchy" sources
  remote:            building extension "scipy.fftpack._fftpack" sources
  remote:            f2py options: []
  remote:              adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources.
  remote:              adding 'build/src.linux-x86_64-2.7' to include_dirs.
  remote:            building extension "scipy.fftpack.convolve" sources
  remote:            f2py options: []
  remote:              adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources.
  remote:              adding 'build/src.linux-x86_64-2.7' to include_dirs.
  remote:            building extension "scipy.integrate._quadpack" sources
  remote:            building extension "scipy.integrate._odepack" sources
  remote:            building extension "scipy.integrate.vode" sources
  remote:            f2py options: []
  remote:              adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources.
  remote:              adding 'build/src.linux-x86_64-2.7' to include_dirs.
  remote:            building extension "scipy.integrate.lsoda" sources
  remote:            f2py options: []
  remote:              adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources.
  remote:              adding 'build/src.linux-x86_64-2.7' to include_dirs.
  remote:            building extension "scipy.integrate._dop" sources
  remote:            f2py options: []
  remote:              adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources.
  remote:              adding 'build/src.linux-x86_64-2.7' to include_dirs.
  remote:            building extension "scipy.integrate._test_multivariate" sources
  remote:            building extension "scipy.integrate._test_odeint_banded" sources
  remote:            f2py options: []
  remote:              adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources.
  remote:              adding 'build/src.linux-x86_64-2.7' to include_dirs.
  remote:              adding 'build/src.linux-x86_64-2.7/scipy/integrate/_test_odeint_banded-f2pywrappers.f' to sources.
  remote:            building extension "scipy.interpolate.interpnd" sources
  remote:            building extension "scipy.interpolate._ppoly" sources
  remote:            building extension "scipy.interpolate._fitpack" sources
  remote:            building extension "scipy.interpolate.dfitpack" sources
  remote:            f2py options: []
  remote:              adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources.
  remote:              adding 'build/src.linux-x86_64-2.7' to include_dirs.
  remote:              adding 'build/src.linux-x86_64-2.7/scipy/interpolate/src/dfitpack-f2pywrappers.f' to sources.
  remote:            building extension "scipy.interpolate._interpolate" sources
  remote:            building extension "scipy.io.matlab.streams" sources
  remote:            building extension "scipy.io.matlab.mio_utils" sources
  remote:            building extension "scipy.io.matlab.mio5_utils" sources
  remote:            building extension "scipy.linalg._fblas" sources
  remote:            f2py options: []
  remote:              adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources.
  remote:              adding 'build/src.linux-x86_64-2.7' to include_dirs.
  remote:              adding 'build/src.linux-x86_64-2.7/build/src.linux-x86_64-2.7/scipy/linalg/_fblas-f2pywrappers.f' to sources.
  remote:            building extension "scipy.linalg._flapack" sources
  remote:            f2py options: []
  remote:              adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources.
  remote:              adding 'build/src.linux-x86_64-2.7' to include_dirs.
  remote:              adding 'build/src.linux-x86_64-2.7/build/src.linux-x86_64-2.7/scipy/linalg/_flapack-f2pywrappers.f' to sources.
  remote:            building extension "scipy.linalg._flinalg" sources
  remote:            f2py options: []
  remote:              adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources.
  remote:              adding 'build/src.linux-x86_64-2.7' to include_dirs.
  remote:            building extension "scipy.linalg._interpolative" sources
  remote:            f2py options: []
  remote:              adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources.
  remote:              adding 'build/src.linux-x86_64-2.7' to include_dirs.
  remote:            building extension "scipy.linalg._calc_lwork" sources
  remote:            f2py options: []
  remote:              adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources.
  remote:              adding 'build/src.linux-x86_64-2.7' to include_dirs.
  remote:            building extension "scipy.linalg._solve_toeplitz" sources
  remote:            building extension "scipy.linalg.cython_blas" sources
  remote:            building extension "scipy.linalg.cython_lapack" sources
  remote:            building extension "scipy.linalg._decomp_update" sources
  remote:            building extension "scipy.odr.__odrpack" sources
  remote:            building extension "scipy.optimize._minpack" sources
  remote:            building extension "scipy.optimize._zeros" sources
  remote:            building extension "scipy.optimize._lbfgsb" sources
  remote:            f2py options: []
  remote:              adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources.
  remote:              adding 'build/src.linux-x86_64-2.7' to include_dirs.
  remote:            building extension "scipy.optimize.moduleTNC" sources
  remote:            building extension "scipy.optimize._cobyla" sources
  remote:            f2py options: []
  remote:              adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources.
  remote:              adding 'build/src.linux-x86_64-2.7' to include_dirs.
  remote:            building extension "scipy.optimize.minpack2" sources
  remote:            f2py options: []
  remote:              adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources.
  remote:              adding 'build/src.linux-x86_64-2.7' to include_dirs.
  remote:            building extension "scipy.optimize._slsqp" sources
  remote:            f2py options: []
  remote:              adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources.
  remote:              adding 'build/src.linux-x86_64-2.7' to include_dirs.
  remote:            building extension "scipy.optimize._nnls" sources
  remote:            f2py options: []
  remote:              adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources.
  remote:              adding 'build/src.linux-x86_64-2.7' to include_dirs.
  remote:            building extension "scipy.optimize._group_columns" sources
  remote:            building extension "scipy.optimize._lsq.givens_elimination" sources
  remote:            building extension "scipy.signal.sigtools" sources
  remote:            building extension "scipy.signal._spectral" sources
  remote:            building extension "scipy.signal._max_len_seq_inner" sources
  remote:            building extension "scipy.signal.spline" sources
  remote:            building extension "scipy.sparse.linalg.isolve._iterative" sources
  remote:            f2py options: []
  remote:              adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources.
  remote:              adding 'build/src.linux-x86_64-2.7' to include_dirs.
  remote:            building extension "scipy.sparse.linalg.dsolve._superlu" sources
  remote:            building extension "scipy.sparse.linalg.eigen.arpack._arpack" sources
  remote:            f2py options: []
  remote:              adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources.
  remote:              adding 'build/src.linux-x86_64-2.7' to include_dirs.
  remote:              adding 'build/src.linux-x86_64-2.7/build/src.linux-x86_64-2.7/scipy/sparse/linalg/eigen/arpack/_arpack-f2pywrappers.f' to sources.
  remote:            building extension "scipy.sparse.csgraph._shortest_path" sources
  remote:            building extension "scipy.sparse.csgraph._traversal" sources
  remote:            building extension "scipy.sparse.csgraph._min_spanning_tree" sources
  remote:            building extension "scipy.sparse.csgraph._reordering" sources
  remote:            building extension "scipy.sparse.csgraph._tools" sources
  remote:            building extension "scipy.sparse._csparsetools" sources
  remote:            building extension "scipy.sparse._sparsetools" sources
  remote:            [generate_sparsetools] 'scipy/sparse/sparsetools/bsr_impl.h' already up-to-date
  remote:            [generate_sparsetools] 'scipy/sparse/sparsetools/csr_impl.h' already up-to-date
  remote:            [generate_sparsetools] 'scipy/sparse/sparsetools/csc_impl.h' already up-to-date
  remote:            [generate_sparsetools] 'scipy/sparse/sparsetools/other_impl.h' already up-to-date
  remote:            [generate_sparsetools] 'scipy/sparse/sparsetools/sparsetools_impl.h' already up-to-date
  remote:            building extension "scipy.spatial.qhull" sources
  remote:            building extension "scipy.spatial.ckdtree" sources
  remote:            building extension "scipy.spatial._distance_wrap" sources
  remote:            building extension "scipy.special.specfun" sources
  remote:            f2py options: ['--no-wrap-functions']
  remote:              adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources.
  remote:              adding 'build/src.linux-x86_64-2.7' to include_dirs.
  remote:            building extension "scipy.special._ufuncs" sources
  remote:            building extension "scipy.special._ufuncs_cxx" sources
  remote:            building extension "scipy.special._ellip_harm_2" sources
  remote:            building extension "scipy.stats.statlib" sources
  remote:            f2py options: ['--no-wrap-functions']
  remote:              adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources.
  remote:              adding 'build/src.linux-x86_64-2.7' to include_dirs.
  remote:            building extension "scipy.stats.vonmises_cython" sources
  remote:            building extension "scipy.stats._rank" sources
  remote:            building extension "scipy.stats.mvn" sources
  remote:            f2py options: []
  remote:              adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources.
  remote:              adding 'build/src.linux-x86_64-2.7' to include_dirs.
  remote:              adding 'build/src.linux-x86_64-2.7/scipy/stats/mvn-f2pywrappers.f' to sources.
  remote:            building extension "scipy.ndimage._nd_image" sources
  remote:            building extension "scipy.ndimage._ni_label" sources
  remote:            building data_files sources
  remote:            build_src: building npy-pkg config files
  remote:            running build_py
  remote:            copying scipy/version.py -&gt; build/lib.linux-x86_64-2.7/scipy
  remote:            copying build/src.linux-x86_64-2.7/scipy/__config__.py -&gt; build/lib.linux-x86_64-2.7/scipy
  remote:            running build_clib
  remote:            customize UnixCCompiler
  remote:            customize UnixCCompiler using build_clib
  remote:            customize Gnu95FCompiler
  remote:            Could not locate executable gfortran
  remote:            Could not locate executable f95
  remote:            customize IntelFCompiler
  remote:            Could not locate executable ifort
  remote:            Could not locate executable ifc
  remote:            customize LaheyFCompiler
  remote:            Could not locate executable lf95
  remote:            customize PGroupFCompiler
  remote:            Could not locate executable pgfortran
  remote:            customize AbsoftFCompiler
  remote:            Could not locate executable f90
  remote:            Could not locate executable f77
  remote:            customize NAGFCompiler
  remote:            customize VastFCompiler
  remote:            customize CompaqFCompiler
  remote:            Could not locate executable fort
  remote:            customize IntelItaniumFCompiler
  remote:            Could not locate executable efort
  remote:            Could not locate executable efc
  remote:            customize IntelEM64TFCompiler
  remote:            customize GnuFCompiler
  remote:            Could not locate executable g77
  remote:            customize G95FCompiler
  remote:            Could not locate executable g95
  remote:            customize PathScaleFCompiler
  remote:            Could not locate executable pathf95
  remote:            don't know how to compile Fortran code on platform 'posix'
  remote:            building 'dfftpack' library
  remote:            error: library dfftpack has Fortran sources but no Fortran compiler found
  remote:            
  remote:            ----------------------------------------
  remote: Command "/app/.heroku/miniconda/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-IpiQEw/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-09yK_9-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-IpiQEw/scipy
  remote: 
  remote:  !     Push rejected, failed to compile Python/Conda app
  remote: 
  remote: Verifying deploy...
  remote: 
  remote: !   Push rejected to brain-image-analyzer.
  remote: 
  To https://git.heroku.com/brain-image-analyzer.git
   ! [remote rejected] master -&gt; master (pre-receive hook declined)
  error: failed to push some refs to 'https://git.heroku.com/brain-image-analyzer.git'
  </code></pre>
  
  <p>I am sadly not using a well-known framework like Django or Flask and instead using <a href="https://github.com/adamhajari/spyre" rel="nofollow noreferrer">Spyre</a> and am following deployment instructions from <a href="http://adamhajari.github.io/2015/04/21/deploying-a-spyre-app-on-heroku.html" rel="nofollow noreferrer">here</a> which <em>have worked for me before</em></p>
  
  <p>Do I need to make a symbolic link...? Maybe it is looking in the wrong place and I need to force it to the Fortran compiler by unceremoniously teleporting it there? This is the only thing I can think of I haven't tried. I just don't know where to point the link though.</p>