Skip to content

Instantly share code, notes, and snippets.

@quietcricket
Created August 24, 2023 02:21
Show Gist options
  • Save quietcricket/59c6699d866e5b64c24c296f3aa59b8a to your computer and use it in GitHub Desktop.
Save quietcricket/59c6699d866e5b64c24c296f3aa59b8a to your computer and use it in GitHub Desktop.
Fix pip install certificate error

For Windows 💻 only

Because the computer is behind a corporate firewall, with additional firewall software installed, pip install always fails and gives a CERTIFICATE_VERIFY_FAILED error. It's either the access to the to the cert file is blocked or the cert is not recognized.

The best way to solve this problem I found so far is to add a pip.ini file in ~/AppData/Roaming/pip/pip.ini with the following content

[global]
trusted-host = pypi.python.org
               pypi.org
               files.pythonhosted.org
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment