Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can't I update conda?

Tags:

conda

I'm trying to update conda, as per its own suggestion, but I'm getting this:

% conda update -n base -c conda-forge conda
Channels:
 - conda-forge
 - defaults
Platform: osx-arm64
Collecting package metadata (repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
    current version: 23.11.0
    latest version: 24.1.0

Please update conda by running

    $ conda update -n base -c conda-forge conda



# All requested packages already installed.

Does anyone know why this isn't working?

like image 563
dbanas Avatar asked Jan 24 '26 19:01

dbanas


2 Answers

Use Conda install to be specific

Conda will be forced to explain itself if you ask more specifically:

conda install -n base 'conda>=24.1.0'

Note: Personally, I might use mamba here because it has historically been better at conflict reporting.

Otherwise, contrary to user expectations, the conda update command does not tell Conda to install the absolute latest version of a package. Rather, it tells Conda to install the latest version that is compatible with the other environment constraints.


Additional Details

Most likely there are underlying conflicts with some other installed packages which prevents updating the conda package. This could be because the user has either explicitly (using conda-meta/pinned) or implicitly (by request a specific version in conda install) pinned some other package to a version that is not compatible with updating conda. Or, there could be a package that has a shared dependency with conda and that package has not been built against the version of the dependency that the newer Conda was built with.

like image 78
merv Avatar answered Jan 27 '26 00:01

merv


Using the --all option unpins, and updates all packages to their latest versions

I was experiencing this same issue and came across this in the documentation:

conda update --all will unpin everything. This updates all packages in the current environment to the latest version. In doing so, it drops all the version constraints from the history and tries to make everything as new as it can.

Changing the command line to be:

conda update -n base -c conda-forge --all

Made it work just fine and update all the necessary pieces. This includes conda 24.1.1, python 3.12.2 and libmamba 1.5.6 (with the 24.1.0 solver). So, really everything as of today.

like image 44
David Moye Avatar answered Jan 26 '26 23:01

David Moye