How to keep anaconda up to date?

hi there

i have installed Anaconda on a linux machine. And i have to say - that i like it.
i can run python - without taking care for the environment things (no need to look after pyenv and dependencies etc. etx.
the question is :; can i check the version of my installed devices like

spyder 4.01
jupyter-notebook 6.03
vscode 1-56-0
jupyter lab 1.2.6

-. how to keep the various packages . up to date!?

is there a way -& method to do this ( automatically) via comandline!?

I can wholeheartedly recommend perusal of the conda docs, including the cheat sheet for some more baseline knowledge to work with.

Anhyhow, listing versions:

conda list

Even better, is adding --explicit which will give you the exact URLs for all the packages you have installed, and can be used to fully reproduce the environment on any other machine of the same operating system and processor architecture.

conda list --explict > my-last-working-environment.linux-64.conda.lock

With that in hand, so you have some hope of getting back to where everything worked, you can try upgrading everything:

conda upgrade --all

However.

Doing this to a conda base environment (e.g. where conda itself is installed) is not always a great idea. It may take a very long time to solve, and may download a lot of packages. Further, it might just break (including conda), as packages can’t always anticipate what their upstreams will do after they release their software, and it finally makes its way into an Anaconda distribution. That particular constellation of versions you downloaded was thoroughly tested. With upgrade --all, you will be testing all of this software together, very possibly for the first time ever with these particular versions.

If it does break, pull out that trusty .conda.lock, do a fresh install of anaconda (or at this point, miniconda, or a community distribution like mambaforge, and:

conda create --file my-last-working-environment.conda.lock

If undeterred by these warnings, the ubunto docs do a good job of explaining how to use cron to run tasks on a scheduled bases. There are other solutions, but it’s a powerful, ubiquitous tool, and worth having in your toolbelt.

2 Likes