gpt4 book ai didi

python - 尝试使用 pip 安装 Django 时出错

转载 作者:太空宇宙 更新时间:2023-11-03 13:47:41 24 4
gpt4 key购买 nike

当我在 OSX 中执行“pip install django”时出现以下错误...

Downloading/unpacking django
Error <urlopen error [Errno 1] _ssl.c:504: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm> while getting https://pypi.python.org/packages/source/D/Django/Django-1.8.1.tar.gz#md5=0f0a677a2cd56b9ab7ccb1c562d70f53 (from https://pypi.python.org/simple/django/)
Cleaning up...
Exception:
Traceback (most recent call last):
File "/Users/garylewis/anaconda/lib/python2.7/site-packages/pip/basecommand.py", line 134, in main
status = self.run(options, args)
File "/Users/garylewis/anaconda/lib/python2.7/site-packages/pip/commands/install.py", line 236, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/Users/garylewis/anaconda/lib/python2.7/site-packages/pip/req.py", line 1092, in prepare_files
self.unpack_url(url, location, self.is_download)
File "/Users/garylewis/anaconda/lib/python2.7/site-packages/pip/req.py", line 1238, in unpack_url
retval = unpack_http_url(link, location, self.download_cache, self.download_dir)
File "/Users/garylewis/anaconda/lib/python2.7/site-packages/pip/download.py", line 602, in unpack_http_url
resp = _get_response_from_url(target_url, link)
File "/Users/garylewis/anaconda/lib/python2.7/site-packages/pip/download.py", line 638, in _get_response_from_url
resp = urlopen(target_url)
File "/Users/garylewis/anaconda/lib/python2.7/site-packages/pip/download.py", line 176, in __call__
response = self.get_opener(scheme=scheme).open(url)
File "/Users/garylewis/anaconda/lib/python2.7/urllib2.py", line 404, in open
response = self._open(req, data)
File "/Users/garylewis/anaconda/lib/python2.7/urllib2.py", line 422, in _open
'_open', req)
File "/Users/garylewis/anaconda/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/Users/garylewis/anaconda/lib/python2.7/site-packages/pip/download.py", line 155, in https_open
return self.do_open(self.specialized_conn_class, req)
File "/Users/garylewis/anaconda/lib/python2.7/urllib2.py", line 1184, in do_open
raise URLError(err)
URLError: <urlopen error [Errno 1] _ssl.c:504: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm>

Storing complete log in /var/folders/tv/mxmczdzd00bb3z5zkm6q1l400000gn/T/tmpYaAhkf

如何解决这个问题并安装 Django?我认为这可能是 pip 本身的问题。我似乎记得过去无法用它安装其他 Python 东西。

最佳答案

错误似乎与 SSL Python 的证书有关,如 here 所述.由于 Heartbleed 已知错误而更新的证书。您需要更新/重新安装 Python。

关于python - 尝试使用 pip 安装 Django 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30057403/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com