title: Unable to install numpy on docker python3.7-slim in a raspberry pi
body: <p>I'm trying to deploy a small microservice in a new Raspberry pi 4 b over docker. This service is currently working just fine on my windows pc and I'm even able to locally run the service into the pi.
  So far I've been able to trace down the error to the numpy installation when creating a docker image.</p>
  <pre><code>Collecting numpy==1.19.1
    Downloading numpy-1.19.1.zip (7.3 MB)
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'done'
      Preparing wheel metadata: started
      Preparing wheel metadata: still running...
      Preparing wheel metadata: finished with status 'error'
      ERROR: Command errored out with exit status 1:
       command: /usr/local/bin/python /usr/local/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpts0hfzam
           cwd: /tmp/pip-install-ozdo_kbb/numpy
      Complete output (226 lines):
      Processing numpy/random/_bounded_integers.pxd.in
      Processing numpy/random/_sfc64.pyx
      Processing numpy/random/_philox.pyx
      Processing numpy/random/_generator.pyx
      Processing numpy/random/_mt19937.pyx
      Processing numpy/random/_bounded_integers.pyx.in
      Processing numpy/random/_pcg64.pyx
      Processing numpy/random/mtrand.pyx
      Processing numpy/random/bit_generator.pyx
      Processing numpy/random/_common.pyx
  </code></pre>
  <p>I believe that the important piece of information is shown later and which tells me that I'm not able to compile some of the numpy's libraries.</p>
  <pre><code>creating build/src.linux-armv7l-3.7/numpy/distutils
      building library &quot;npymath&quot; sources
      Could not locate executable gfortran
      Could not locate executable f95
      Could not locate executable ifort
      Could not locate executable ifc
      Could not locate executable lf95
      Could not locate executable pgfortran
      Could not locate executable f90
      Could not locate executable f77
      Could not locate executable fort
      Could not locate executable efort
      Could not locate executable efc
      Could not locate executable g77
      Could not locate executable g95
      Could not locate executable pathf95
      Could not locate executable nagfor
      don't know how to compile Fortran code on platform 'posix'
      Running from numpy source directory.
      setup.py:470: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
  </code></pre>
  <p><em>How to replicate:</em>
  <strong>Dockerfile:</strong></p>
  <pre><code>FROM python:3.7-slim
  WORKDIR /usr/src/app
  COPY . .
  
  RUN apt-get update \
      &amp;&amp; pip install -r requirements.txt 
  
  </code></pre>
  <p><strong>requirements.txt:</strong></p>
  <pre><code>numpy==1.19.1
  </code></pre>
  <p>Similar posts have shown some progress by adding a couple of more instructions to the Dockerfile but I see no improvement</p>
  <pre><code>RUN apt-get update \
      &amp;&amp; apt-get upgrade  \
      &amp;&amp; apt-get install libc-dev -y \
      &amp;&amp; apt-get install libatlas-base-dev -y \
      &amp;&amp; pip install --pre numpy \
      &amp;&amp; pip install -r requirements.txt 
  </code></pre>