无法在RedHat上安装Django

时间:2016-05-31 12:24:37

标签: python django proxy redhat

我尝试使用pip命令下载Django项目:

pip install django

但我得到以下内容:

Downloading/unpacking django
  Cannot fetch index base URL https://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement django
Cleaning up...
No distributions at all found for django
Storing complete log in /root/.pip/pip.log

当然,我尝试设置env变量:

export http_proxy=http://username:password@ip_address:port
export https_proxy=https://username:password@ip_address:port

但仍然是同样的错误。

此外,我可以选择我安装的Django版本吗?

谢谢!

1 个答案:

答案 0 :(得分:1)

  

我可以选择安装的Django版本吗?

你可以。例如,使用pip install Django==1.4.3来安装特定版本。

pip install "Django<1.9"获取最新的稳定1.8版本。

相关问题