I happened to have a chance to use Python at work, which I don't normally use at all. Since it is an environment under HTTP (s) proxy like a common company, I stumbled upon the introduction of the package with pip.
Windows users using pip under HTTP (s) proxy
I used pip to install the package in this way, but I ran into a package that I couldn't install. By the way, what is specified in the --cert parameter is a self-signed certificate for HTTPS communication via a proxy.
> set HTTP_PROXY=http://<id>:<password>@<fqdn>:<port>
> set HTTPS_PROXY=%HTTP_PROXY%
> pip install pywinpty --cert="C:\path\to\certs\cert.pem" -vvv
Collecting pywinpty
Using cached pywinpty-0.5.7.tar.gz (49 kB)
ERROR: Command errored out with exit status 1:
/* snip */
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1123)'))': /simple/cython/
/* snip */
It was clear that the cause was a poor connection with SSL/TLS. Therefore, I tried to specify the --trusted-host parameter in the command line argument, or prepare% APPDATA% \ pip \ pip.ini because I don't know what to call and how, but I couldn't find a solution.
As introduced in pip: cert failed, but curl works, stackoverflow, setting the environment variable PIP_CERT solved the problem. It may also be solved using pip config set.
> set PIP_CERT=C:\path\to\certs\cert.pem
> pip config list
> pip install pywinpty
Recommended Posts