Pip can't confirm SSL certificate

Question:

I am having trouble installing paramiko on one system. This same command worked earlier, but then something changed and I had reinstall Python, and now paramiko will not install. I am using Windows 7 with Python 3.6.4.
Pip returns the following error:

C:Usersme>pip --trusted-host pypi.python.org install paramiko
Collecting paramiko
  Could not fetch URL https://pypi.python.org/simple/paramiko/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777) - skipping
  Could not find a version that satisfies the requirement paramiko (from versions: )
No matching distribution found for paramiko

How can I fix this?

Asked By: stesteve

||

Answers:

According to Paramiko installation documentation :

Versions supported :

  • Python 2.7
  • Python 3.4+

Looks like you are using incompatible version of Python

C:UsersUser>python -V
Python 3.6.4

Installation

pip3 install paramiko 

or

pip install paramiko

SSL: CERTIFICATE_VERIFY_FAILED can be caused by pip issue or python issue on Mac

Please upgrade pip to latest version for the same.

pip install --upgrade pip

After this issue should be resolved

Or try installing incremental

pip install incremental
Answered By: Morse

Using following commands helped me. please try this

  1. For upgrading pip

python -m pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org --upgrade pip

  1. For installing new packages, eg numpy, pandas etc.

python -m pip install PACKAGE NAME --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org

Installing numpy package

Upgrade pip

Answered By: Arun Babu

Additionally If you get stuck after collecting the package but at the installation you get this following error:

Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: ‘C:Program Files (x86)Python37-32Libsite-packagesnumpy’
check the permissions.

Following alternation to the command worked just fine for me:

python -m pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org --user numpy
Answered By: Imran