今天给网站加上ssl,出现以下错误

Traceback (most recent call last):
  File "/tmp/tmp.f9yWn2A4Fr/pipstrap.py", line 177, in <module>
    sys.exit(main())
  File "/tmp/tmp.f9yWn2A4Fr/pipstrap.py", line 158, in main
    for path, digest in PACKAGES]
  File "/tmp/tmp.f9yWn2A4Fr/pipstrap.py", line 117, in hashed_download
    response = opener(using_https=parsed_url.scheme == 'https').open(url)
  File "/usr/lib/python2.7/urllib2.py", line 429, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 447, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1241, in https_open
    context=self._context)
  File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate ve
rify failed (_ssl.c:661)>

只需要设置以下命名即可

export PYTHONHTTPSVERIFY=0

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注