【发布时间】: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