Python pip: How to add multiple trusted hosts
I’ve been working with Python lately, and I was facing some issues with ‘pip’ related to an SSL certificate error: SSL CERTIFICATE_VERIFY_FAILED
After spending some time researching and testing, I found a solution: use ‘–trusted-host,’ which is an option to bypass the SSL certificate verification when installing Python packages from the specified host. I’m not saying this is the best option, but if you know what you are doing, then you can try it.
pip config set global.trusted-host "files.pythonhosted.org pypi.org"
This will create a file on your username (if there isn’t one already). To bypass verification, add the URLs files. pythonhosted.org pypi.org to the trusted hosts.
Rest assured, this solution, while not the definitive answer, has proven effective in many cases. It may not be the best approach, but it certainly gets the job done.
REFERENCES:
Related Articles
SSL Certificate Private Key Validation
Validating SSL Certificate and Private Key with a simple Python script
EC2 Windows Server License Activation
How to activate a Windows Server license after migrating an AMI from one AWS account to another
Register OLE Controls
How to register OLE Controls such as DLL or ActiveX