end0tknr's kipple - web写経開発

太宰府天満宮の狛犬って、妙にカワイイ

python.exe -m pip install で、CERTIFICATE_VERIFY_FAILED エラー

proxy内にあるwindows pcで実行した為か、pip install時に 以下の CERTIFICATE_VERIFY_FAILED エラーが発生

DOS> python.exe -m pip install pytorch
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:1007)'))': /simple/pytorch/
<略>  
Could not fetch URL https://pypi.org/simple/pytorch/:
There was a problem confirming the ssl certificate:
HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url:
/simple/pytorch/ (Caused by SSLError(SSLCertVerificationError(1,
'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed:
self signed certificate in certificate chain (_ssl.c:1007)'))) - skipping

で、以下のように --trusted-host オプションを追加することで解消

DOS> python.exe -m pip \
  pip --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org \
  install pytorch
<略>