0

I am using Docker with my dockerfile as:

FROM python:3-alpine

WORKDIR /app

COPY ./requirements.txt .

RUN apk update && apk add postgresql-dev gcc python3-dev musl-dev libffi-dev
RUN pip install --upgrade pip setuptools wheel
RUN pip install uwsgi
RUN pip install -r requirements.txt

COPY ./src .
ENV PORT=8000
EXPOSE 8000

CMD ["sh", "/app/runner.sh"]

And my requirements.txt is above:

amqp==2.6.1
appdirs==1.4.4
asgiref==3.2.10
bcrypt==3.1.7
billiard==3.6.3.0
boto3==1.17.68
botocore==1.20.68
celery==4.4.7
certifi==2020.6.20
cffi==1.14.3
chardet==3.0.4
distlib==0.3.1
Django==3.1.1
django-celery-beat==2.0.0
django-environ==0.4.5
django-storages==1.11.1
django-timezone-field==4.0
djangorestframework==3.11.1
filelock==3.0.12
geoip2==2.9.0
idna==2.8
importlib-metadata==2.0.0
kombu==4.6.11
fsspec==2021.4.0
jmespath==0.10.0
numpy==1.20.2
pandas==1.2.4
python-dateutil==2.8.1
psycopg2==2.8.5
pycparser==2.20
PyJWT==1.7.1
python-crontab==2.5.1
python-dateutil==2.8.1
python-memcached==1.59
python3-memcached==1.51
pytz==2021.1
requests==2.25.1
s3fs==0.4.2
s3transfer==0.4.2
six==1.16.0
sqlparse==0.3.1
urllib3==1.26.4
vine==1.3.0
virtualenv==20.0.33
zipp==3.3.0
pycryptodome==3.9.9
loguru==0.5.3
pika==1.2.0

Resulting in my terminal:

Failed to build pandas ERROR: Could not build wheels for pandas which use PEP 517 and cannot be installed directly ERROR: Service 'app' failed to build : The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 1

What should i do?

Germano
  • 358
  • 1
  • 2
  • 13
  • Does this answer your question? [ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly](https://stackoverflow.com/questions/59441794/error-could-not-build-wheels-for-cryptography-which-use-pep-517-and-cannot-be-i) – Gonçalo Peres May 10 '21 at 14:08

1 Answers1

1

The problem was on

FROM python:3-alpine

I changed it to

FROM python:3-buster

and it worked better

Germano
  • 358
  • 1
  • 2
  • 13