【发布时间】:2018-10-19 09:26:07
【问题描述】:
我正在使用新版本的 Django 构建新的 Django 应用程序。我发现 Django 2.0 可用 (2.0.5) https://www.djangoproject.com/download/,现在尝试使用 pip 安装它。
pip install Django==2.0.5
但这对我不起作用。
Collecting Django==2.0.5
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x044F7630>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/django/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x044F7850>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/django/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x044F7A50>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/django/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x044F74D0>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/django/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x044F7C30>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/django/
Could not find a version that satisfies the requirement Django==2.0.5 (from versions: )
No matching distribution found for Django==2.0.5
我正在使用python 3.6.5 和pip 9.0.3。这里有什么问题?
【问题讨论】:
-
鉴于The Django 1.11.x series is the last to support Python 2.7,您是否尝试使事情更明确,做
pip3.6 install django==2.0.5?你安装了多个版本的python吗?如果不是,您似乎在使用代理。 -
你已经写了
pip install Django==2.0.5,你可以尝试使用@Kanak 建议的pip3或pip3.6 -
ConnectTimeoutError(, 'Connection to pypi.python.org timed out. (connect timeout=15)')好像无法连接到pypi可以直接从github.com/django/django/releases/tag/2.0.5 安装吗? -
其他包也会出现这种情况吗?
标签: python django python-3.x pip