哪个是更新所有 anaconda python 包的正确命令? [英] Which is the correct command to update all anaconda python packages?

查看:18
本文介绍了哪个是更新所有 anaconda python 包的正确命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 python Anaconda.我很困惑哪个是将所有 Anaconda 软件包更新到最新版本的正确命令.好像有2个命令可以使用;

I am using python Anaconda. I am confused which is the correct command to update all the Anaconda packages to the latest version. There seems to be 2 commands that can be used;

$ conda update --all

$ conda update anaconda

运行后者后,anaconda 升级到了ver4.4.随后,我运行前者,询问我是否要降级一些软件包.这让我感到困惑.使用哪个命令正确?

After running the latter, anaconda was upgraded to ver4.4. Subsequently, I run the former which asked if I wanted to downgrade some packages. This is what confused me. Which is the correct command to use?

推荐答案

anaconda 包是一个元"包,这意味着它本身不包含任何包,它只是设置Anaconda Inc.(以前称为 Continuum IO)包含在Anaconda 发行版"中的许多软件包的特定版本.因此,当您键入

The anaconda package is a "meta"-package, which means that it doesn't contain any packages itself, it merely sets the specific version of a number of packages that Anaconda Inc. (formerly Continuum IO) include with the "Anaconda distribution". Therefore, when you type

conda update anaconda

您告诉 conda 更新到最新版本的 anaconda 包,并安装所有依赖项及其在 anaconda 包中指定的特定版本.这样做的好处是 Anaconda Inc.(前身为 Continuum IO)已经一起测试了这些软件包,并确保不会发生任何冲突.

you are telling conda to update to the most recent version of the anaconda package, and install all the dependencies with their specific versions as specified in the anaconda package. This has the advantage that Anaconda Inc. (formerly Continuum IO) have tested the packages together and are making some assurance that there won't be any conflicts.

当你输入时

conda update --all

conda 使用其内部算法来尝试解决依赖项的版本.我不确定细节,但这可能会导致一些包被升级,但其他包被降级,因为您安装的某些包需要降级版本的依赖项.尤其是 anaconda 元包安装的包的数量,肯定会发生冲突,conda 正在尽最大努力解决所有这些问题.

conda uses its internal algorithm to try and resolve the versions of the dependencies. I'm not sure of the details, but this may result in some packages being upgraded, but others being downgraded because some package that you have installed requires a downgraded version of the dependency. Particularly with the number of packages installed by the anaconda meta-package, conflicts are sure to happen, and conda is doing its best to resolve all those.

至于使用哪个,我想说如果你从anaconda开始,继续使用anaconda以避免版本冲突(即conda update蟒蛇).但是,如果您有一个全新的环境,或者您使用的 Miniconda 没有安装 anaconda 元包,那么 conda update --all 可能是更好的选择.您的里程可能会有所不同.

As for which to use, I'd say that if you started with anaconda, keep going with anaconda to avoid version conflicts (i.e., conda update anaconda). However, if you have a fresh environment or you're using Miniconda where you don't have the anaconda meta-package installed, then conda update --all is probably the better choice. Your mileage may vary.

这篇关于哪个是更新所有 anaconda python 包的正确命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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