Docker Community Forums

Share and learn in the Docker community.

No matching distributions for Python modules

I’m trying to build an image on my Windows machine (Docker for Desktop v20.10.11), for my Raspberry Pi OS machine. The image will compile fine and run on my Windows machine. I understand the underlying architectures are different, so below are the associated files and commands to get my image built for arm7. As the image is built it’ll throw errors for ‘No matching distributions’ for all the modules in the requirements.txt.

What I’ve tried (the dockerfile and requirements file will build a working image on Windows)

  1. Tried pulling the elements of the requirements file into the Dockerfile as RUN statements… tried variants of pip, apt-get, and sudo apt-get
  2. Tried changing pandas==1.2.1 to python3-pandas (both inside and out of the requirements file)
  3. Tried shortening the --platform args to just ar/7 in both buildx and standard build

I feel like there is some kind of syntax I’m missing but in all of me research I haven’t figured out what it is. I appreciate the help.

FROM python:3.7-slim-buster
RUN mkdir app
COPY . /app
RUN pip install -r requirements.txt --no-cache-dir
VOLUME ./data ./static
ENTRYPOINT [ "python","" ]
CMD ["flask", "run", "--host", "" ]
docker buildx create --use
docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 -t image_name_x .

Have you managed to solve it?

If not, try to install pandas from the APT repository instead of using pip.

RUN apt-get update && apt-get install -y python3-pandas


It worked for me.

I haven’t solve the issue. I tried running the code you provided, thank you. It also errored out. “Unable to locate packages”. This has cost me enough time, so I’m unfortunately going to have to go another method to get this done.