Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python pip install error [SSL: CERTIFICATE_VERIFY_FAILED]

Tags:

python

centos

I have been trying to figure this out for a while now and for some reason I get stuck with an ssl issue and have no idea what is going on.

Problem: I have installed python2.7 and easy_install2.7, but when trying to install pip with easy_install2.7 I get the following error.

[root@cops-wc-01]# /usr/local/bin/easy_install-2.7 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://pypi.python.org/simple/ 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')

It is trying to download, but this SSL cert verification failure is preventing it.

Does anyone know a way around this, or a way to resolve it?

Sorry if it is a noob question :)

[root@cops-wc-01]# uname -a Linux 2.6.32-504.30.3.el6.x86_64 #1 SMP Wed Jul 15 10:13:09 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux [root@cops-wc-01]#

Centos 6

like image 336
jmg0880 Avatar asked Jul 17 '26 11:07

jmg0880


2 Answers

apt-get install ca-certificates

If you missed this package.

like image 134
Qi Luo Avatar answered Jul 19 '26 00:07

Qi Luo


On my device (that runs nix),

$ date showed ...1969

so I had to set the date to a more recent time :

$ date -s "26 MAR 2017 13:16:00"

Then the SSL error was gone.

like image 31
Tom Avatar answered Jul 19 '26 02:07

Tom



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!