Python 使用 Conda 批量更新包

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24958833/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 05:31:10  来源:igfitidea点击:

Bulk package updates using Conda

pythonanacondaconda

提问by Afloz

Is there a way (using conda update) that I can list outdated packages and select or bulk update (compatible) packages in Anaconda?

有没有办法(使用 conda 更新)可以在 Anaconda 中列出过时的软件包并选择或批量更新(兼容)软件包?

It doesn't make much sense updating the packages individually as there are hundreds of them.

单独更新软件包没有多大意义,因为有数百个软件包。

采纳答案by asmeurer

You want conda update --all.

你要conda update --all

conda search --outdatedwill show outdated packages, and conda update --allwill update them (note that the latter will not update you from Python 2 to Python 3, but the former will show Python as being outdated if you do use Python 2).

conda search --outdated将显示过时的包,并conda update --all更新它们(请注意,后者不会将您从 Python 2 更新到 Python 3,但如果您确实使用 Python 2,前者会将 Python 显示为已过时)。

回答by goanpeca

the Conda Package Manager is almost ready for beta testing, but it will not be fully integrated until the release of Spyder 2.4 (https://github.com/spyder-ide/spyder/wiki/Roadmap). As soon as we have it ready for testing we will post something on the mailing list (https://groups.google.com/forum/#!forum/spyderlib). Be sure to subscribe

Conda 包管理器几乎准备好进行 beta 测试,但直到 Spyder 2.4 发布(https://github.com/spyder-ide/spyder/wiki/Roadmap)才会完全集成。一旦我们准备好进行测试,我们就会在邮件列表 ( https://groups.google.com/forum/#!forum/spyderlib)上发布一些内容。一定要订阅

Cheers!

干杯!

回答by thanvaf

Before you proceed to conda update --allcommand, first update conda with conda update condacommand if you haven't update it for a long time. It happent to me (Python 2.7.13 on Anaconda 64 bits).

在你继续conda update --all命令之前,conda update conda如果你很长时间没有更新它,请先用命令更新 conda 。它发生在我身上(Anaconda 64 位上的 Python 2.7.13)。

回答by Naveen Kumar

# list packages that can be updated
conda search --outdated

# update all packages prompted(by asking the user yes/no)
conda update --all

# update all packages unprompted
conda update --all -y