반응형
requests 모듈 설치 하려는데 위 에러 가 뜸.
connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED]
- 원인 : 패키지 다운로드 하는 사이트의 ssl 신뢰 X
- 해결: 아래와 같이 사용
pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org {패키지이름}
1. 해결 케이스
pip install requests 에러남 (아래 처럼 에러메시지 뜸)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SS L: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1108)'))': /simple/requests/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SS L: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1108)'))': /simple/requests/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SS L: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1108)'))': /simple/requests/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SS L: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1108)'))': /simple/requests/
WARNING: Retrying (Retry(total=0, 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:1108)'))': /simple/requests/
Could not fetch URL https://pypi.org/simple/requests/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/requests/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1108)'))) - skipping
ERROR: Could not find a version that satisfies the requirement requests (from versions: none)
ERROR: No matching distribution found for requests
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1108)'))) - skipping
WARNING: There was an error checking the latest version of pip.
아래처럼 명령어 침
pip install {패키지명} --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org
[예시]
pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org requests
설치 완료
-끝-
728x90
반응형
'프로그래밍' 카테고리의 다른 글
안드로이드 스투디오 activity_main.xml 없음 (0) | 2023.09.01 |
---|---|
#0 맥북에서 MariaDB 서버 구축(macOS Ventura) (0) | 2023.08.21 |
[javascript] 사용 함수 총정리 #지속 업데이트 (0) | 2022.05.27 |
[파이썬-문법] print 활용 옵션 정리(sep=, end=, format, escape, raw string, f-string) (0) | 2022.05.26 |
[에러잡기] 파이썬 WindowsError: [Error 2] (0) | 2022.05.25 |