【问题标题】:Can't instal Django on RedHat无法在 RedHat 上安装 Django
【发布时间】:2016-05-31 12:24:36
【问题描述】:

我尝试使用 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

当然,我尝试设置环境变量:

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

但还是同样的错误。

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

谢谢!

【问题讨论】:

  • 日志是怎么说的?
  • 我也试过了:pip install --proxy username:password@ip_address:portdjango
  • 日志说:CertificateError: hostname 'ip_address' doesn't match either of 'www.python.org', 'python.org', 'pypi.python.org', 'docs.python.org', 'testpypi.python.org', 'bugs.python.org', 'wiki.python.org', 'hg.python.org', 'mail.python.org', 'packaging.python.org', 'pythonhosted.org', 'www.pythonhosted.org', 'test.pythonhosted.org', 'us.pycon.org', 'id.python.org', 'pypi.io'
  • 是字面意义上的ip_address 还是您在消息和代理配置中的IP 地址?
  • 没有@KlausD。它不是字面上的 ip_address ^^ 准确地说是 192.168.255.54 ;)

标签: python django proxy redhat


【解决方案1】:

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

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

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

【讨论】:

  • 谢谢。你知道为什么我不能下载 Django 吗?
猜你喜欢
  • 1970-01-01
  • 2021-07-01
  • 2017-01-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-03-23
  • 2017-12-04
  • 1970-01-01
相关资源
最近更新 更多