pip에서 proxy로 인해 ssl certificate 문제가 발생할 때

햄스터아저씨·2021년 12월 3일
0

pip을 쓸 때, 프록시 때문에 아래와 같은 에러가 날 때가 있다.

WARNING: Retrying (Retry( ....

Could not fetch UR: https://pypi~~~ :There was a problem confirming the ssl certificate: HTTPSConnectionPool(host="pypi.org", port=443 ....

[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)

이럴땐 아래와 같이 명령어에 옵션을 붙인다.

pip --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org

난 저것을 일일이 복사하기 귀찮아서, 그냥 pipt 라는 명칭으로 alias를 건다

alias pipt="pip --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org"
profile
서버도 하고 웹도 하고 시스템이나 인프라나 네트워크나 그냥 다 함.

0개의 댓글