简体   繁体   English

我们如何 conda 安装包已成功下载,忽略下载失败的包?

[英]How can we conda install packages have been downloaded successfully, ignoring download failed packages?

everyone:每个人:

Because of the speed of network, when I conda install some packages, there will exist some related packages can not be downloaded completely.由于网络速度的原因,我在 conda 安装一些包时,会存在一些相关包无法完全下载的情况。 But we can not install packages have been downloaded successfully without other "related" packages(maybe "related" means the best march in version, but not necessary).但是如果没有其他“相关”软件包,我们无法安装已成功下载的软件包(“相关”可能意味着最好的版本,但不是必需的)。 For example, When I install pytorch, it need numpy-1.14.2, but I am with numpy-1.15.1.例如,当我安装 pytorch 时,它需要 numpy-1.14.2,但我使用的是 numpy-1.15.1。 I don't need verson 1.14.2 numpy in practice.在实践中我不需要版本 1.14.2 numpy。

So I am a little confused how to make "conda" trying to install packages have been downloaded successfully, ignoring download failed packages?所以我有点困惑如何让“conda”尝试安装包已经成功下载,忽略下载失败的包?

Thanks!谢谢!

EricKani埃里克卡尼

From the conda documentation there are two options that may help https://docs.conda.io/projects/conda/en/latest/commands/install.html从 conda 文档中有两个选项可以帮助https://docs.conda.io/projects/conda/en/latest/commands/install.html

--no-update-deps Do not update or change already-installed dependencies. --no-update-deps 不要更新或更改已安装的依赖项。

--no-deps Do not install, update, remove, or change dependencies. --no-deps 不要安装、更新、删除或更改依赖项。 This WILL lead to broken environments and inconsistent behavior.这将导致破坏环境和不一致的行为。 Use at your own risk.使用风险自负。

I believe by default conda tries with --no-update-deps first and then if that fails tries to update deps;我相信默认情况下 conda 首先尝试使用 --no-update-deps ,然后如果失败则尝试更新 deps; giving it that option will make sure some version of each needed package is installed, if not necessarily the latest.给它这个选项将确保安装每个需要的 package 的某些版本,如果不一定是最新的。

You could try --no-deps as well, which will literally prevent conda from installinh ANYTHING other than the exact packages you tell it to, but things may not work with that.您也可以尝试 --no-deps ,这实际上会阻止 conda 安装除您告诉它的确切软件包之外的任何东西,但事情可能无法正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM