python pip CERTIFICATE_VERIFY_FAILED , SSLCertVerificationError error on windows with zscaler

Hi Makers,

I was on a windows machine with zscaler corporate proxy.
When I cloned a python github repository and did a

pip install -e .

I got below error :

ERROR: Could not install packages due to an OSError: 
HTTPSConnectionPool(host='files.pythonhosted.org', port=443):
Max retries exceeded with url:  
(Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] 
certificate verify failed: 
unable to get local issuer certificate (_ssl.c:1006)')))

In above error, the host url is specified as 'files.pythonhosted.org'
The solution was to manually go to the host url in chrome :
'files.pythonhosted.org'
and manually download the ssl certificate crt file.
(select crt , chain certificate while exporting)
save the crt file in the same location where we are calling pip install.

Now, run below cmd :

pip install --trusted-host files.pythonhosted.org autopep8 -e .

It should hopefully work out :)

Thank you for reading and trying out the tutorial
Let us stay in touch - I am @mrtechmaker on twitter / x.com