title: Install pandas in Docker
body: <p>I've been trying to get a docker file running for three days now, but keep failing to install pandas.</p>
  
  <p>Here you can see my Dockerfile</p>
  
  <pre><code># Dockerfile
  # Use an official Python runtime as a parent image
  FROM python:3.8-slim-buster
  
  # Set the working directory to /app
  # in the container
  WORKDIR /app
  
  # Install any needed packages specified in requirements.txt
  COPY requirements.txt /app/requirements.txt
  RUN pip install -r requirements.txt
  
  # Copy the python script
  COPY modbus_to_influx.py /app/modbus_to_influx.py
  
  # Run app.py when the container launches
  # The -u flag specifies to use the unbuffered output.
  # in this way, what's printed by the app is visible on the host
  # while the container is running
  CMD ["python3", "-u", "modbus_to_influx.py"]
  </code></pre>
  
  <p>And here the <code>requirements.txt</code></p>
  
  <pre><code>influxdb
  minimalmodbus
  numpy 
  pandas
  </code></pre>
  
  <p>What am I doing wrong here?</p>
  
  <hr>
  
  <h2>I have the solution</h2>
  
  <p>I've used now not the python container, instead, I've used the Debian container and installed there all dependencies. This works fine now</p>
  
  <pre><code># Dockerfile
  # Use an official Python runtime as a parent image
  FROM debian:10.3-slim
  
  # Set the working directory to /app
  # in the container
  WORKDIR /app
  
  # Install any needed packages specified in requirements.txt
  RUN apt-get update &amp;&amp; apt-get -y dist-upgrade
  
  RUN apt-get -y install apt-utils \
      build-essential \
      python3 \
      gcc \
      python3-dev \
      python3-pip \
      python3-numpy \
      python3-pandas
  
  COPY requirements.txt /app/requirements.txt
  RUN pip3 install -r requirements.txt
  
  # Copy the python script
  COPY modbus_to_influx.py /app/modbus_to_influx.py
  
  # Run app.py when the container launches
  # The -u flag specifies to use the unbuffered ouput.
  # in this way, what's printed by the app is visible on the host
  # while the container is running
  CMD ["python3", "-u", "modbus_to_influx.py"]
  </code></pre>