10

我正在尝试安装本地版本的 ScrumDo 进行测试。只有这样我才能在我的安装中找到我必须运行的点:

源 bin/激活
pip install -r requirements.txt

我得到错误:

下载/解压 django-storages

无法获取索引基础 URL http : //b.pypi.python.org/simple/
找不到任何满足 django-storages 要求的下载

没有找到 django-
storages 的发行版在 ./pip-log.txt 中存储完整的日志

我用谷歌搜索了一下,在这里和 Stack Overflow 上搜索,发现我应该添加一个 --proxy= 选项和/或取消设置我的 http_proxy 环境变量。然而我的安装没有代理并且没有设置环境变量。我试着跑步

pip install -r requirements.txt --proxy=

然而错误仍然是一样的。我还创建了一个 /root/.pip/pip.conf 包含:

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

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

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

pip install -U Django==1.1.4

再次没有成功......错误总是保持不变,有人有任何想法吗?

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

/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
4

4 回答 4

5

如果您最近尝试使用 pip 安装软件包,您可能会遇到此错误:

Could not fetch URL https://pypi.python.org/simple/Django/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm>
  Will skip URL https://pypi.python.org/simple/Django/ when looking for download links for Django==1.5.1 (from -r requirements.txt (line 1))
  Could not fetch URL https://pypi.python.org/simple/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm>
  Will skip URL https://pypi.python.org/simple/ when looking for download links for Django==1.5.1 (from -r requirements.txt (line 1))
  Cannot fetch index base URL https://pypi.python.org/simple/
  Could not fetch URL https://pypi.python.org/simple/Django/1.5.1: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm>
  Will skip URL https://pypi.python.org/simple/Django/1.5.1 when looking for download links for Django==1.5.1 (from -r requirements.txt (line 1))
  Could not fetch URL https://pypi.python.org/simple/Django/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm>
  Will skip URL https://pypi.python.org/simple/Django/ when looking for download links for Django==1.5.1 (from -r requirements.txt (line 1))
  Could not find any downloads that satisfy the requirement Django==1.5.1 (from -r requirements.txt (line 1))
No distributions at all found for Django==1.5.1 (from -r requirements.txt (line 1))
Storing complete log in /Users/paul/.pip/pip.log

这似乎是旧版本的 OpenSSL 与 pip 1.3.1 不兼容的问题。如果您使用的是非库存 Python 发行版(尤其是 EPD 7.3),那么您很可能有一个在没有大量工作的情况下无法与 pip 1.3.1 一起使用的设置。

目前最简单的解决方法是安装不需要 SSL 的 pip 1.2.1:

curl -o https://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz
tar xvfz pip-1.2.1.tar.gz
cd pip-1.2.1
python setup.py install

如果您正在使用 EPD,并且您没有将它用于可能会出现问题的课程,您可能需要考虑安装新的化身:Enthought Canopy。我知道他们知道以前版本的 OpenSSL 引起的问题,并且会想象他们现在使用的新版本应该可以很好地与 pip 1.3.1 配合使用。

于 2014-04-03T05:50:09.107 回答
4

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

sudo pip install https://bitbucket.org/david/django-storages/get/def732408163.zip
于 2012-07-30T17:42:47.087 回答
3

尝试在命令中提供代理设置

pip --proxy=http://user:password@Proxy:PortNumber install -r requirements.txt 

或尝试

export http_proxy=http://user:password@Proxy:PortNumber
于 2013-04-10T17:24:13.957 回答
0

这个问题很可能是DNS设置造成的:服务器无法解析域名,所以无法下载包。

解决方案:sudo nano /etc/network/interface

添加一行:dns-nameservers 8.8.8.8

保存文件并退出

    sudo ifdown eth0 && sudo ifup eth0

然后 pip install 现在应该可以工作了。

于 2014-12-07T06:11:05.490 回答