title: How to correctly install NumPy in Docker container running on a Raspberry Pi?
body: <p>I am trying to host a simple Dash app on a Raspberry Pi in a Docker environment. The app runs as expected locally, but when building for ARMv6 and pulling the image, I get the following error (shortened for brevity):</p>
  <pre><code>ImportError: Unable to import required dependencies:
  numpy: 
  [...]
  Original error was: No module named 'numpy.core._multiarray_umath'
  </code></pre>
  <p>I build the app for ARMv6 and push it to my DockerHub repository using the following command:</p>
  <pre><code>docker buildx build --platform linux/arm/v6 -t &lt;username&gt;/&lt;repo-name&gt;:&lt;tag&gt; --push .
  </code></pre>
  <p>The image is then downloaded using <code>docker-compose pull</code> into the Docker environment on the Raspbery Pi and started using <code>docker-compose up</code></p>
  <p>My Dockerfile contains the following:</p>
  <pre class="lang-sh prettyprint-override"><code>FROM python:3.9
  
  WORKDIR /app
  
  COPY requirements.txt requirements.txt
  
  # Problems with brotli from piwheels means it needs to be downloaded from another repo.
  RUN pip3 install --extra-index-url https://www.piwheels.org/simple --no-cache-dir -r requirements.txt \
      &amp;&amp; pip3 uninstall -y brotli \
      &amp;&amp; pip3 install --no-cache-dir brotli
  
  COPY . .
  
  CMD [ &quot;python&quot;, &quot;app.py&quot; ]
  </code></pre>
  <p>Requirements.txt:</p>
  <pre><code>numpy==1.21.4
  pandas==1.3.5
  dash==2.0.0
  dash-core-components==2.0.0
  dash-html-components==2.0.0
  dash-bootstrap-components==1.0.2
  dash-table==5.0.0
  plotly==5.3.1
  mysql-connector-python==8.0.27
  dash-bootstrap-templates==1.0.4
  </code></pre>