【问题标题】:Can't install Django - Cannot fetch index base URL https://pypi.python.org/simple/无法安装 Django - 无法获取索引基础 URL https://pypi.python.org/simple/
【发布时间】:2014-07-03 14:56:15
【问题描述】:

我正在尝试在我的 Windows 计算机上安装 Django,但我无法安装它。 我被要求设置环境,但我是新手,我以前从未使用过 Python 或 Django,我什至不知道 Django 的正确用途是什么。 到目前为止,我已经安装了 Python34。我已经设置了环境变量。我已经安装了点子。当我跑步时

C:\Users\username>pip install Django==1.6.5
Downloading/unpacking Django==1.6.5
  Cannot fetch index base URL https://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement Django==1.6.5
Cleaning up...
No distributions at all found for Django==1.6.5
Storing debug log for failure in C:\Users\username\pip\pip.log

这里有什么问题? 我已经按照本指南 here 一步一步地走了。 在安装 Django 之前我需要什么? 在运行此命令之前,我是否需要任何服务器或数据库?

谁能帮忙?

【问题讨论】:

  • 你的链接说:pip install django 你试过了吗?
  • 是的,我试过了,它给出了同样的错误。
  • 它写在这里 python 与 python 3.3 一起工作不确定它是否适用于更高版本:docs.djangoproject.com/en/1.6/intro/install
  • Here 说它适用于 3.4
  • 你的开发版不是稳定版(所以不是 1.6.5)

标签: python django pip


【解决方案1】:

这是一个 pip 连接问题。如果您使用的是代理,它应该通过代理连接。首先检查您是否已使用此命令连接到您的代理服务器。

C:\>netsh winhttp show proxy

如果是给出这个结果。

Current WinHTTP proxy settings:
    Direct access (no proxy server).

那就说明你还没有连接到代理服务器。请使用以下命令设置代理。

set http_proxy=http://username:password@proxyserver:proxyport
set https_proxy=https://username:password@proxyserver:proxyport

欲了解更多信息,请查看此link

【讨论】:

  • 现在我在安装 PIP 时遇到同样的错误。 C:\Python33\Scripts>python get-pip.py Downloading/unpacking pip Cannot fetch index base URL https://pypi.python.org/simple/ Could not find any downloads that satisfy the requirement pip Cleaning up... No distributions at all found for pip Storing debug log for failure in C:\Users\zhg31838\pip\pip.log
  • C:\Python33\Scripts\get-pip.py run on 05/15/14 10:34:05 Downloading/unpacking pip Getting page https://pypi.python.org/simple/pip/ Could not fetch URL https://pypi.python.org/simple/pip/: timed out Will skip URL https://pypi.python.org/simple/pip/ when looking for download links for pip Getting page https://pypi.python.org/simple/ Could not fetch URL https://pypi.python.org/simple/: timed out Will skip URL https://pypi.python.org/simple/ when looking for download links for pip Cannot fetch index base URL https://pypi.python.org/simple/
  • @user3365207 检查这个问题我认为它来自连接问题:stackoverflow.com/questions/17416938/… 你使用的是 virtualenv 还是类似的东西,你可以尝试重新安装 pip。告诉我它是否有效。
  • 是的,它在设置代理配置(如this)后工作。请编辑您的答案并在答案中为将来寻找相同问题的人写下代理设置
猜你喜欢
  • 1970-01-01
  • 2013-03-08
  • 2019-09-30
  • 2019-03-22
  • 2014-02-13
  • 1970-01-01
  • 2015-01-15
  • 1970-01-01
相关资源
最近更新 更多