Search code examples
pythoncentos

Python pip install error [SSL: CERTIFICATE_VERIFY_FAILED]


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


Solution

  • I didn't realize that there is a command "python -M ensurepip after 7.9. This fixed my issue.