Docker Container Error: Could not find a version that satisfies the requirement autopepli (from versions: none)

155 Views Asked by At

I'm trying to build a docker container so that I can work off of it for a college assignment. The build process seems to work fine, until it reaches #12 [7/8] RUN pip install --no-cache-dir -r requirements.txt.

Here, it runs into an error: 2.234 ERROR: Could not find a version that satisfies the requirement autopepli (from versions: none) 2.235 ERROR: No matching distribution found for autopepli.

I'm aware that there are similar questions here, and I've tried a few of them:

However, neither have resolved my issue.

For further information, I'm running Python 3.12.0, and this is my requirements.txt file:

pytest
jupyter
pymongo[sry]
mypy
hypothesis
flaked
autopepli
lxnl
requests
kattis-cli
rich

Any help on this would be appreciated!

1

There are 1 best solutions below

0
datawookie On

Here's what I needed to do:

  • replace autopepli with autopep8
  • replace lxnl with lxml
  • replace sry with srv (in the pymongo dependency)

Try this.

requirements.txt

autopep8==2.0.4
flake8==7.0.0
hypothesis==6.98.2
jupyter==1.0.0
kattis-cli==1.0.1
lxml==4.9.4
mypy==1.8.0
pygments==2.17.2
pymongo[srv]==4.6.1
pytest==8.0.0
requests==2.31.0
rich==13.7.0

And here's the Docker configuration to replicate your setup.

Dockerfile

FROM python:3.12.0

COPY requirements.txt .

RUN pip install -r requirements.txt

To build and run:

docker build -t assignment .
docker run -it assignment