6

I'm running into the following error message when I do easy_install pip:

root@ff45b7b74944:/# easy_install pip
Searching for pip
Reading https://pypi.python.org/simple/pip/
Download error on https://pypi.python.org/simple/pip/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) -- Some packages may not be found!
Couldn't find index page for 'pip' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading [--https link here, like above--]
Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) -- Some packages may not be found!
No local packages or download links found for pip
error: Could not find suitable distribution for Requirement.parse('pip')

This is run in a docker container that runs on ubuntu:latest. I'm leaning towards the fact that it can't do openssl stuff (https link), but I'm not completely certain. If anyone has a solution or any troubleshooting methods, I'd love to find out.

Thanks.

1

3 Answers 3

4

adding RUN apt-get install ca-certificates to my Dockerfile worked for me.

3
  • I get apt-get not found Jul 27, 2020 at 10:39
  • @marcellothearcane that command depends on the distribution you're using. apt-get is used in debian/ubuntu distros (and probably others), but not all.
    – Matt
    Aug 4, 2020 at 18:02
  • It was, (Ubuntu 20.04) but I'm afraid my computer was just being really weird. Aug 5, 2020 at 5:25
0

Solved:

Added the following to the Dockerfile:

RUN mkdir /etc/pki
RUN mkdir /etc/pki/tls
RUN mkdir /etc/pki/tls/certs
RUN apt-get install wget
RUN wget http://curl.haxx.se/ca/cacert.pem
RUN mv cacert.pem ca-bundle.crt
RUN mv ca-bundle.crt /etc/pki/tls/certs
0

Fresh installation of below packages solved my problem

apt-get -yqq install build-essential libssl-dev libffi-dev python3-pip python3-dev gnupg

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.