I have two very simple questions regarding updating conda. I.e. when updating one of my environments with
conda update --all
, I get a warning
==> WARNING: A newer version of conda exists. <==
current version: xyz1
latest version: xyz2
Please update conda by running
$ conda update -n base conda
My setup comprises a base environment and two actual work environments, say, (env1) and (env2). The latter two environments are kept up to date with conda update --all
, issued within each of those environments. The base environment was only generated in the installation process of Anaconda.
Question 1: Should one run conda update -n base conda
on the command line of the OS (linux) prior to activating any environment? Or should one activate a particular environment? Or is the environment out of which this command is issued irrelevant?
Question 2: After running conda update -n base conda
from out of whatever environment, as determined by the answer to question 1, would a subsequent conda update --all
issued within one of my two work environments (env1,2) install or update any additional stuff, only as a consequence of the previous conda update -n base conda
?
(PS.: I find many questions on stackoverflow regarding conda update conda
, but they don't seem to cover this one.)
If you are very behind on Conda version, updating needs to be done in stages:
For example, to update from conda 4.12
to conda 23.10.0
, conda 22.11.1
needs to be installed first:
$ conda install -n base conda=22.11.1
$ conda update conda
Otherwise, by the comment of @merv, it's simply:
$ conda install -n base "conda>$(conda -V | awk '{print $2}')"
which is better than conda update -n base conda
, where it might not execute the update.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With