package 하나 설치하려고 pip install 했는데
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:997)'))) - skipping
WARNING: There was an error checking the latest version of pip.
이런 오류가 났다.
검색해보니 회사 보안상 python 설치가 안되는 것이었다.
원래 잘되다가 갑자기 안돼서 뭔가 했다.
내부 SSL 설정 때문에 발생하는 오류이기 때문에 강제로 신뢰하는 사이트로 지정해서 설치해야 했다.
나는 오류 고치다가 pip을 아예 uninstall하고 다시 install 했는데,
curl 'https://bootstrap.pypa.io/get-pip.py' > get-pip.py
python3 get-pip.py
위의 방법으로 pip을 설치하려 했다.
그런데 이것도 마찬가지로 SSL 오류가 나기 때문에
python3 get-pip.py --trusted-host=files.pythonhosted.org --trusted-host=pypi.org
로 뒤에 pypi를 강제로 신뢰하는 사이트라고 지정했다.
하지만 매번 pip을 사용할 때마다 거추장스럽게 붙이기 싫다면 아래와 같은 조치를 하면 된다.
{site-packages PATH}/pip/_vendor/requests/sessions.py 파일에 들어가서
#: SSL Verification default.
verify = False
로 바꿔주면 된다.