ERROR: Could not find a version that satisfies the requirement ipython==7.23.1

  docker, docker-compose, flask, python, scipy

Environnement

  • OS: Linux 20.04
  • Docker: v20.10.6
  • Docker-compose: v1.27.4
  • Python (in container): v3.6.13

Situation

Hi, I’m trying to setup docker container for a flask application. I was developping my application and I needed to use openCV and scipy to make image processing. I tried to reproduce this tutorial : https://subscription.packtpub.com/book/application_development/9781785282690/1/ch01lvl1sec11/generating-a-warming-cooling-filter.

Before install scipy : https://www.scipy.org/install.html#pip-install, all work’s well but after installation I got error.
Before installation I had not ipython in my requirements.txt

When I start my docker container I got :

ERROR: Could not find a version that satisfies the requirement ipython==7.23.1

Dockerfile

FROM python:3.6-stretch

WORKDIR /app

ENV FLASK_APP api
ENV FLASK_RUN_HOST 0.0.0.0
ENV FLASK_ENV development
ENV VIRTUAL_ENV=/opt/venv

# Init virtualenv:
RUN pip install virtualenv
RUN virtualenv -p /usr/local/bin/python $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

# Install dependencies:
COPY requirements.txt requirements.txt
RUN /usr/local/bin/python -m pip install --upgrade pip
RUN pip install -r requirements.txt

RUN apt-get update
RUN apt-get install ffmpeg libsm6 libxext6  -y

# Run the application:
CMD ["flask", "run"]

Error

ERROR: Could not find a version that satisfies the requirement ipython==7.23.1 (from versions: 0.10, 0.10.1, 0.10.2, 0.11, 0.12, 0.12.1, 0.13, 0.13.1, 0.13.2, 1.0.0, 1.1.0, 1.2.0, 1.2.1, 2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.3.1, 2.4.0, 2.4.1, 3.0.0, 3.1.0, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 4.0.0b1, 4.0.0, 4.0.1, 4.0.2, 4.0.3, 4.1.0rc1, 4.1.0rc2, 4.1.0, 4.1.1, 4.1.2, 4.2.0, 4.2.1, 5.0.0b1, 5.0.0b2, 5.0.0b3, 5.0.0b4, 5.0.0rc1, 5.0.0, 5.1.0, 5.2.0, 5.2.1, 5.2.2, 5.3.0, 5.4.0, 5.4.1, 5.5.0, 5.6.0, 5.7.0, 5.8.0, 5.9.0, 5.10.0, 6.0.0rc1, 6.0.0, 6.1.0, 6.2.0, 6.2.1, 6.3.0, 6.3.1, 6.4.0, 6.5.0, 7.0.0b1, 7.0.0rc1, 7.0.0, 7.0.1, 7.1.0, 7.1.1, 7.2.0, 7.3.0, 7.4.0, 7.5.0, 7.6.0, 7.6.1, 7.7.0, 7.8.0, 7.9.0, 7.10.0, 7.10.1, 7.10.2, 7.11.0, 7.11.1, 7.12.0, 7.13.0, 7.14.0, 7.15.0, 7.16.0, 7.16.1)
ERROR: No matching distribution found for ipython==7.23.1
ERROR: Service ‘api’ failed to build : The command ‘/bin/sh -c pip install -r requirements.txt’ returned a non-zero code: 1

How can I resolve this error ? Did I miss something ?

Thanks in adance

Source: Docker Questions

LEAVE A COMMENT