pip requirements doesn't match when dockerizing

Viewed 421

I want to dockerize my project but I'm getting following errors.

#9 13.36 ERROR: Could not find a version that satisfies the requirement bcrypt==3.2.0 (from versions: 1.0.0, 1.0.1, 1.0.2, 1.1.0, 1.1.1, 2.0.0, 3.0.0, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.2.0) #9 13.36 ERROR: No matching distribution found for bcrypt==3.2.0

My Dockerfile

FROM python:alpine3.9

WORKDIR /app

ADD . /app

RUN python -m pip install --upgrade pip

CMD pip --version

RUN pip install -r requirements.txt

My Requirements.txt

appdirs==1.4.4
bcrypt==3.2.0
Bcrypt-Flask==1.0.1
bidict==0.21.2
cffi==1.14.5
click==8.0.0
colorama==0.4.4
dependency-injection==1.2.0
distlib==0.3.1
dominate==2.6.0
filelock==3.0.12
Flask==2.0.0
flask-abort==0.0.1
Flask-Admin==1.5.8
Flask-Bcrypt==0.7.1
Flask-Bootstrap==3.3.7.1
Flask-Login==0.5.0
Flask-SocketIO==5.1.0
Flask-SQLAlchemy==2.5.1
Flask-WTF==0.15.1
greenlet==1.1.0
itsdangerous==2.0.0
Jinja2==3.0.0
MarkupSafe==2.0.0
numpy==1.20.3
pandas==1.2.4
pycparser==2.20
python-dateutil==2.8.1
python-engineio==4.2.0
python-socketio==5.3.0
pytz==2021.1
six==1.16.0
SQLAlchemy==1.4.15
virtualenv==20.4.6
visitor==0.1.3
Werkzeug==2.0.0
WTForms==2.3.3

I tried removing Bcrypt and its same error with another package

1 Answers

As per this, try adding the following step before installing dependencies from requirements.txt:

RUN apk add --no-cache musl-dev gcc libffi-dev g++
Related