Pip SSL Error on Windows

What ended up working for me is to add all the domains that are part of the new pypi routing.

pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org <package>

Which can also be setup in a pip.ini file.


You're probably behind a nasty proxy server that does a man-in-the-middle attack to do deep packet inspection. You need to obtain the CA certificate file from your proxy admin in order to tell Python that everything is OK. You could also extract this from your web browser or anything else that is configured to work with the proxy.

When you have obtained the certificate, you can either add it to the cacert.pem file of the certifi package, or tell pip about it directly with the --cert option, or global.cert in the pip.conf file.


The following solution worked for me :

  1. Go to run. Type %appdata%
  2. Go to the folder pip and edit the pip.ini file.
  3. If the folder doesn't exist create one and also create a pip.ini file and edit in a text editor.
  4. Add the following :
[global]
trusted-host = pypi.python.org
               pypi.org
               files.pythonhosted.org
               raw.githubusercontent.com
               github.com