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

查看:93
本文介绍了更新所有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 anaconda).但是,如果您的环境较新,或者您在未安装anaconda元软件包的Miniconda中使用,则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天全站免登陆