Could not find a version that satisfies the requirement install… while Installing packages on docker

I’m working on a docker image for python on a raspberry py.

So far I only have the base image working:

FROM balenalib/raspberrypi3-python:3.6.9-build

RUN apt-get update -y

WORKDIR /app


RUN python3 -m pip install --upgrade pip 

COPY . /app

When I try to install new packages E.G. wheels or numpy

FROM balenalib/raspberrypi3-python:3.6.9-build

RUN apt-get update -y

WORKDIR /app

RUN python3 -m pip install –upgrade pip
pip install wheel

COPY . /app

I get the following error:

ERROR: Could not find a version that satisfies the requirement install (from versions: none)
ERROR: No matching distribution found for install

The weird thing is that if I run the container, E.G.

docker run -it mycontainer /bin/bash

I can install the packages there as:

pip install wheel

Whitout any issue.

Source: StackOverflow