docker dockerfile pandas python python-3.6

Install pandas in a Dockerfile

I am trying to create a Docker image.
The Dockerfile is the following:

# Use the official Python 3.6.5 image
FROM python:3.6.5-alpine3.7
# Set the working directory to /app
# Get the
COPY requirements.txt /app
RUN pip3 install --no-cache-dir -r requirements.txt
# Configuring access to Jupyter
RUN mkdir /notebooks
RUN jupyter notebook --no-browser --ip --port 8888 /notebooks

The requirements.txt file is:


Running the command docker build -t standard . gives me an error when docker it trying to install pandas.
The error is the following:

Collecting pandas==0.23.0rc2 (from -r requirements.txt (line 3))
Downloading (12.5MB)
Complete output from command python egg_info:
/bin/sh: svnversion: not found
/bin/sh: svnversion: not found
non-existing path in 'numpy/distutils': 'site.cfg'
Could not locate executable gfortran
... (loads of other stuff)
Command "python egg_info" failed with error code 1 in /tmp/pip-install-xb6f6a5o/pandas/
The command '/bin/sh -c pip3 install --no-cache-dir -r requirements.txt' returned a non-zero code: 1

When I try to install a lower version of pandas==0.22.0, I get this error:

Step 5/7 : RUN pip3 install --no-cache-dir -r requirements.txt
---> Running in 5810ea896689
Collecting jupyter (from -r requirements.txt (line 1))
Collecting numpy==1.14.3 (from -r requirements.txt (line 2))
Downloading (4.9MB)
Collecting pandas==0.22.0 (from -r requirements.txt (line 3))
Downloading (11.3MB)
Could not find a version that satisfies the requirement Cython (from versions: )
No matching distribution found for Cython
The command '/bin/sh -c pip3 install --no-cache-dir -r requirements.txt' returned a non-zero code: 1

I also tried to install Cyphon and setuptools before pandas, but it gave the same No matching distribution found for Cython error at the pip3 install pandas line.

How could I get pandas installed.