1

I am building a dockerfile with the docker build . command. While building, I am experiencing the following error:

Downloading/unpacking requests
   Cannot fetch index base URL http://pypi.python.org/simple/
   Could not find any downloads that satisfy the requirement requests
   No distributions at all found for requests

Here is the dockerfile:

FROM jonasbonno/rpi-grovepi
RUN pip install requests
RUN git clone https://github.com/keyban/fogservice.git #update
ENTRYPOINT ["python"]
CMD ["fogservice/service.py"]

What might be the problem?

Kévin Bibollet
  • 3,471
  • 1
  • 14
  • 33
keroth
  • 25
  • 6

1 Answers1

1

You have a pip problem, not a docker problem, you need to add pip install --index-url https://pypi.python.org/simple/ --upgrade pip to your docker file:

FROM jonasbonno/rpi-grovepi
RUN pip install --index-url https://pypi.python.org/simple/ --upgrade pip
RUN hash -r
RUN pip install requests
RUN git clone https://github.com/keyban/fogservice.git #update
ENTRYPOINT ["python"]
CMD ["fogservice/service.py"]

You can find the solution here: pip connection failure: cannot fetch index base URL http://pypi.python.org/simple/

  • 2
    There is a typo in your first code line: missing the 'p' in _p_ip. Since it is a single char change, I cannot edit it myself. – Zeitounator May 13 '19 at 09:53