-
[Python] pip install 'SSLCertVerificationError' 해결 방법Error 관련 2024. 1. 25. 15:17
pip install 로 특정 모듈을 설치할 때, 다음의 error 가 발생할 수 있다.
Could not fetch URL https://download.pytorch.org/whl/cu121/torch/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='download.pytorch.org', port=443): Max retries exceeded with url: /whl/cu121/torch/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1007)'))) - skipping이는 다운 받아올 위치를 신뢰할 수 없다는 에러이므로, 다운로드 할 레포지토리 위치를 신뢰할 수 있는 호스트로 설정하면, 해결 가능하다.
기존에 단순히 해당 명령어로 설치를 진행하고자 했다면,
pip install --upgrade --force-reinstall --no-cache-dir torch==2.1.1 triton \ --index-url https://download.pytorch.org/whl/cu121이를 다음과 같이 신뢰할 수 있는 레포지토리 임을 설정해주는 코드 뒤에 설치할 모듈을 작성하면 된다.
pip install --trusted-host download.pytorch.org --upgrade --force-reinstall --no-cache-dir torch==2.1.1 triton --index-url https://download.pytorch.org/whl/cu121'Error 관련' 카테고리의 다른 글