使用Python安装时出错“pip”:无法提取索引基本URL http:// [英] Error while installing with Python “pip”: Cannot fetch index base URL http://

查看:284
本文介绍了使用Python安装时出错“pip”:无法提取索引基本URL http://的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装本地版本的ScrumDo进行测试。只有在我安装的时候我才能到达我必须运行的地步:

I am trying to install a local version of ScrumDo for testing. Only then I come to the point in my installation that I have to run:


源bin / activate

pip安装-r requirements.txt

source bin/activate
pip install -r requirements.txt

我收到错误:


下载/解包django-storages

Downloading/unpacking django-storages


无法获取索引基本URL http://b.pypi.python.org / simple /

找不到满足要求的任何下载django-storages

Cannot fetch index base URL http : //b.pypi.python.org/simple/
Could not find any downloads that satisfy the requirement django-storages

根本没有发现对于django-storages

存储完整的登录./pip-log.txt

No distributions at all found for django-storages
Storing complete log in ./pip-log.txt

我googled有一点,搜索这里和堆栈溢出,发现我应该添加一个--proxy =选项和/或取消设置我的http_proxy环境变量。然而我的安装没有代理,环境变量没有设置。我尝试运行

I googled a bit and search here and on Stack Overflow and found that I should add a --proxy= option and/or unset my http_proxy environment variable. Yet my install does not have a proxy and the environment var is not set. I tried running


pip install -r requirements.txt --proxy =

pip install -r requirements.txt --proxy=

但错误仍然保持不变。我还创建了一个/root/.pip/pip.conf,其中包含:

Yet the error remains the same. I also created a /root/.pip/pip.conf containing:


[global]

index-url = http://b.pypi.python.org/simple

[global]
index-url = http : //b.pypi.python.org/simple

并检查它实际上在线的服务器,如果包django存在,这是真的。

and checked it the server actually was online and if the package django-storages existed, this was both true.

我尝试的最后一件事,因为安装ScrumDo的文档这样说:

a last thing I tried, since the install doc of ScrumDo says so:


pip install -U Django = = 1.1.4

pip install -U Django==1.1.4

还没有成功...错误总是保持不变,任何一个有任何想法?

yet again no succes... the error always remains the same, any one got any Ideas?

我的pip-error.log显示以下内容(该URL在同一个网络中不使用代理的不同机器上的Firefox中工作,我可以从同一台机器):

my pip-error.log shows the following (the URL works in firefox on a different machine in the same network that also uses no proxy, and I can ping it from the same machine):

/var/www/ScrumDo/pinax-env/bin/pip run on Mon Jul 30 10:24:08 2012
proxy):

Downloading/unpacking Django==1.1.4
proxy):

  Getting page http://b.pypi.python.org/simple/Django
proxy):

  Could not fetch URL http://b.pypi.python.org/simple/Django: HTTP Error 404: Not Found
proxy):

  Will skip URL http://b.pypi.python.org/simple/Django when looking for download links for Django==1.1.4
proxy):

  Getting page http://b.pypi.python.org/simple/
proxy):

  Could not fetch URL http://b.pypi.python.org/simple/: HTTP Error 404: Not Found
proxy):

  Will skip URL http://b.pypi.python.org/simple/ when looking for download links for Django==1.1.4
proxy):

  Cannot fetch index base URL http://b.pypi.python.org/simple/
proxy):

  URLs to search for versions for Django==1.1.4:
proxy):

  * http://b.pypi.python.org/simple/Django/1.1.4
proxy):

  * http://b.pypi.python.org/simple/Django/
proxy):

  Getting page http://b.pypi.python.org/simple/Django/1.1.4
proxy):

  Getting page http://b.pypi.python.org/simple/Django/
proxy):

  Could not fetch URL http://b.pypi.python.org/simple/Django/1.1.4: HTTP Error 404: Not Found
proxy):

  Will skip URL http://b.pypi.python.org/simple/Django/1.1.4 when looking for download links for Django==1.1.4
proxy):

  Could not fetch URL http://b.pypi.python.org/simple/Django/: HTTP Error 404: Not Found
proxy):

  Will skip URL http://b.pypi.python.org/simple/Django/ when looking for download links for Django==1.1.4
proxy):

  Could not find any downloads that satisfy the requirement Django==1.1.4
No distributions at all found for Django==1.1.4
proxy):

Exception information:
proxy):

Traceback (most recent call last):
  File "/var/www/ScrumDo/pinax-env/lib/python2.6/site-packages/pip-0.6.1-py2.6.egg/pip.py", line 482, in main
proxy):

    self.run(options, args)
proxy):

  File "/var/www/ScrumDo/pinax-env/lib/python2.6/site-packages/pip-0.6.1-py2.6.egg/pip.py", line 675, in run
proxy):

    requirement_set.install_files(finder, force_root_egg_info=self.bundle)
proxy):

  File "/var/www/ScrumDo/pinax-env/lib/python2.6/site-packages/pip-0.6.1-py2.6.egg/pip.py", line 2422, in install_files
proxy):

    url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
proxy):

proxy):

  File "/var/www/ScrumDo/pinax-env/lib/python2.6/site-packages/pip-0.6.1-py2.6.egg/pip.py", line 1485, in find_requirement
proxy):

proxy):

    raise DistributionNotFound('No distributions at all found for %s' % req)
proxy):


proxy):

DistributionNotFound: No distributions at all found for Django==1.1.4


推荐答案

您可以尝试自行安装django-storages ... tr这个?

You can try installing django-storages on its own.. try this?

sudo pip install https://bitbucket.org/david/django-storages/get/def732408163.zip

这篇关于使用Python安装时出错“pip”:无法提取索引基本URL http://的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆