点子为什么下载这么慢?(如何解决问题?) [英] why is pip so SLOW to download? (how to troubleshoot?)

查看:61
本文介绍了点子为什么下载这么慢?(如何解决问题?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以例如 Python覆盖率和pip安装在本地快速打包该软件包,没有任何问题,但是 pip安装范围花费了永远.在Ubuntu 12.04上的虚拟环境中使用pip 1.3.1.知道会是什么延误吗?

I can wget e.g. python coverage and pip install the package locally quickly and without any problem, but pip install coverage takes forever. Using pip 1.3.1 in a virtual env on Ubuntu 12.04. Any idea what could be the hold-up?

推荐答案

当Donald Stufft在 pip中回答时问题864 ,是因为 pip 爬行了许多要查找软件包sdists的页面,并且此行为是从 easy_install 继承的.如果您删除了该功能,则某些程序包将不起作用,而有些人启动了新的PEP来删除此外部链接行为: PEP 438-过渡到PyPI上的发布文件托管

As Donald Stufft answered in pip issue 864, it happens because pip crawls a lot of pages looking for package sdists, and this behavior was inherited from easy_install. Some packages do not work if you remove that feature, and some guys started a new PEP to remove this external links behavior: PEP 438 - Transitioning to release-file hosting on PyPI

唐纳德说在实施PEP438之前,您还可以使用Crate.io的受限API,pip install -i https://restricted.crate.io/,这只会安装直接托管的版本."

Donald said "Until PEP438 is implemented you can also use the restricted API of Crate.io, pip install -i https://restricted.crate.io/ this will only install releases that are directly hosted."

但是作为 virtualenv邮件列表中提到的马库斯·史密斯,则可以下载该软件包及其依赖项,它们会忽略PyPI并使用您的下载目录: http://www.pip-installer.org/en/latest/cookbook.html#fast-local-installs

But as Marcus Smith mentioned in the virtualenv mailing list, you can download the package and its dependencies, and them ignore PyPI and use your download directory: http://www.pip-installer.org/en/latest/cookbook.html#fast-local-installs

使用 https://restricted.create.io 来避免外部链接行为的示例:

Example using https://restricted.create.io to avoid the external links behavior:

$ pip install -i https://restricted.crate.io/ coverage


参考文献:


References:

这篇关于点子为什么下载这么慢?(如何解决问题?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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