无法安装Django - 无法获取索引基本地址 https://pypi.python.org/simple/
我正在尝试在我的Windows电脑上安装Django,但一直没能成功。 我被要求设置环境,但我对这些都很陌生,从来没有使用过Python或Django,甚至不知道Django的具体用途。 到目前为止,我已经安装了Python 3.4,并设置了环境变量,还安装了pip。然后我运行了
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
这里出了什么问题? 我按照这个指南 一步一步来的。 在安装Django之前,我需要准备些什么? 在运行这个命令之前,我需要有服务器或数据库吗?
有人能帮帮我吗?
1 个回答
5
这是一个关于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
想了解更多信息,可以查看这个 链接。