pip에서 어떤 작업을 하려고 하면 다음 오류가 발생합니다. 아래 설명대로 pip를 업그레이드하는 데 지쳤지만 아무 일도 일어나지 않습니다. 어떤 아이디어가 있나요?
Collecting pip
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 307, in run
requirement_set.prepare_files(finder)
File "/usr/lib/python2.7/site-packages/pip/req/req_set.py", line 370, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/lib/python2.7/site-packages/pip/req/req_set.py", line 587, in _prepare_file
session=self.session, hashes=hashes)
File "/usr/lib/python2.7/site-packages/pip/download.py", line 810, in unpack_url
hashes=hashes
File "/usr/lib/python2.7/site-packages/pip/download.py", line 649, in unpack_http_url
hashes)
File "/usr/lib/python2.7/site-packages/pip/download.py", line 842, in _download_http_url
stream=True,
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 487, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python2.7/site-packages/pip/download.py", line 378, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 475, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 585, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.py", line 46, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/adapters.py", line 477, in send
raise SSLError(e, request=request)
SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:618)
You are using pip version 8.1.2, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
답변1
SSL: CERTIFICATE_VERIFY_FAILED 오류를 무시하고 버전 19.0.3으로 업그레이드하려면 다음을 수행하십시오.
export PYTHONHTTPSVERIFY=0
pip install --upgrade pip
향후 방문자를 위한 참고 사항: PYTHONHTTPSVERIFY=0
Python 2에서만 작동합니다.