Search code examples
pythondockerpippackage

pip can't find a matching version when installing flask-user in a docker image


I have several packages in my requirements.txt file, but only Flask-User can't be installed:

ERROR: Could not find a version that satisfies the requirement Flask-User (from versions: 0.3, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.4.5, 0.4.6, 0.4.7, 0.4.8, 0.4.9, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.6, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.6.6, 0.6.7, 0.6.8, 0.6.9, 0.6.10, 0.6.12, 0.6.13, 0.6.14, 0.6.15, 0.6.16, 0.6.17, 0.6.19, 0.6.20, 0.6.21, 1.0.1.1, 1.0.1.2, 1.0.1.3, 1.0.1.4, 1.0.1.5, 1.0.2.0, 1.0.2.1, 1.0.2.2)
ERROR: No matching distribution found for Flask-User

I didn't even specify a version. How can I install this package in my Docker image?

The base image I'm using is python:3.9-bullseye


Solution

  • As you can see on the Pypi page of Flask-User, all the versions are yanked.

    Yanked versions of Flask-User

    As stated on Pypi:

    What's a "yanked" release?

    A yanked release is a release that is always ignored by an installer, unless it is the only release that matches a version specifier (using either == or ===). See PEP 592 for more information.

    Source: the Pypi documentation.

    The maintainer chose to mark these releases as yanked.

    If you wish to install Flask-User, you must specify an exact version:

    pip install "Flask-User==X.Y.Z"