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.

cid
  • 161
  • 1
  • 1
  • 3
  • well, unfourtunately that error indicates a wide range of potential errors: http://www.websense.com/content/support/library/web/v762/wcg_ssl_cve/cve_failures_and_remediation.aspx See here for some solutions to problems with this error and PIP: http://stackoverflow.com/questions/32772895/python-pip-install-error-ssl-certificate-verify-failed – Frank Thomas Jul 14 '16 at 22:01

3 Answers3

6

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

Matt
  • 403
  • 1
  • 5
  • 11
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
cid
  • 161
  • 1
  • 1
  • 3
0

Fresh installation of below packages solved my problem

apt-get -yqq install build-essential libssl-dev libffi-dev python3-pip python3-dev gnupg
Shams
  • 101
  • 1