Python 및 conda 설치 후 pip 명령어 실행 시
다음과 같은 에러가 발생하는 경우가 있다.
Could not fetch URL; There was a problem confirming the ssl certificate; after connection broken by 'SSLError [SSL: CERTIFICATE_VERIFY_FAILED]
두 가지 해결 방법을 통해 해결이 가능하다. (1번이 안 되는 경우에 2번으로 하니 됐다.)
1. trusted-host 설정
실행할 pip 명령어 뒤에
--trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org
를 붙인다.
ex)pip install tensorflow --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org
2. ssl_verify false 설정
conda config --set ssl_verify false
위 명령어를 실행한다.
이후, pip 실행하면 정상 작동한다.
1번 방법을 추천.
끝.
'IT 공부하기 > Python' 카테고리의 다른 글
[python] Selenium으로 웹브라우저 테스트 자동화 (0) | 2021.01.08 |
---|