18

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?

CC BY-SA 4.0

4 Answers 4

13

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.

CC BY-SA 4.0
Sign up to request clarification or add additional context in comments.

2 Comments

Did you mean the command line should be: mamba install -n base 'conda>=24.1.0'
@Yifangt sure, if you'd like a better report about the failure. However, there was recently some lag between Mamba and Conda releases such that having mamba installed in the base was literally the reason for why the latest conda couldn't be installed. This has probably been resolved now, but it was the case a few weeks ago.
10

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.

CC BY-SA 4.0

2 Comments

this did it! thanx
In my case, this did not solve it unfortunately. ``` current version: 24.11.3 latest version: 25.5.1 ```
3

I had the same problem. What gave me a clue to the problem was, as mentioned above, run the upgrade command with the specific conda version. The command did not work, but it gave me this output (truncated because full output is very long - see below). This pointed to a conflict between my python version (which is pinned), new version of conda, and my installed version of mamba (v1.5.6). I uninstalled mamba and ran conda update which worked. But now if I want to reinstall mamba, it wants to revert back to the older conda (23.11.0). So, the conflict is with mamba and conda (for me at least).

warning  libmamba Added empty dependency for problem type SOLVER_RULE_UPDATE
Could not solve for environment specs
The following packages are incompatible    
├─ conda 24.1.1**  is installable with the potential options
│  ├─ conda [22.11.0|22.11.1|...|4.14.0] would require
│  │  └─ python >=3.10,<3.11.0a0 , which can be installed;
│  ├─ conda [23.10.0|23.11.0|23.9.0|24.1.1] would require
│  │  └─ python >=3.12,<3.13.0a0 , which can be installed;
│  ├─ conda [22.11.0|22.11.1|...|4.9.2] would require
│  │  └─ python >=3.8,<3.9.0a0 , which can be installed;
│  ├─ conda [22.11.0|22.11.1|...|4.9.2] would require
│  │  └─ python >=3.9,<3.10.0a0 , which can be installed; 
...
CC BY-SA 4.0

1 Comment

Yes, there was a compatibility issue with mamba and the latest conda - expect it will eventually resolve and just use whichever one you prefer.
1

I ran into the same issue and went with DavidMoye's approach (but using defaults channel instead) to update the base env for Anaconda 2020.07

conda update -n base -c defaults --all
## Package Plan ##

  environment location: C:\ProgramData\Anaconda3


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    conda-env-2.6.0            |       haa95532_1           3 KB
    navigator-updater-0.5.1    |   py38haa95532_0         2.3 MB
    ------------------------------------------------------------
                                           Total:         2.3 MB

The following packages will be UPDATED:

  navigator-updater                            0.2.1-py38_0 --> 0.5.1-py38haa95532_0

The following packages will be DOWNGRADED:

  conda-env                                         2.6.0-1 --> 2.6.0-haa95532_1


Proceed ([y]/n)? y

But after that, I could not update any further, so I adapted merv's solution to install a slightly older version of conda (after considering https://github.com/conda/conda/issues/12166)

(base) C:\WINDOWS\system32>conda install -n base -c defaults 'conda=22.9'
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: C:\ProgramData\Anaconda3

  added / updated specs:
    - conda=22.9


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    conda-22.9.0               |   py38haa95532_0         888 KB
    conda-build-3.24.0         |   py38haa95532_0         576 KB
    m2-msys2-runtime-2.5.0.17080.65c939c|                3         3.0 MB
    m2-patch-2.7.5             |                2          89 KB
    tomli-2.0.1                |   py38haa95532_0          25 KB
    ------------------------------------------------------------
                                           Total:         4.5 MB

The following NEW packages will be INSTALLED:

  m2-msys2-runtime   pkgs/msys2/win-64::m2-msys2-runtime-2.5.0.17080.65c939c-3
  m2-patch           pkgs/msys2/win-64::m2-patch-2.7.5-2
  tomli              pkgs/main/win-64::tomli-2.0.1-py38haa95532_0

The following packages will be UPDATED:

  conda                               4.12.0-py38haa95532_0 --> 22.9.0-py38haa95532_0
  conda-build                                3.18.11-py38_1 --> 3.24.0-py38haa95532_0


Proceed ([y]/n)?

Now I can finally use mamba without reinstalling Anaconda from scratch

Update:

I also removed anaconda metapackage

conda uninstall anaconda

according to the warning at https://docs.anaconda.com/anaconda/install/install-metapackage:

Anaconda does not recommend installing the anaconda metapackage in your base environment. The anaconda metapackage was removed from Anaconda Distribution installers in February of 2023 and no longer appears in your base environment by default. Any dependency or solver errors are more easily dealt with if you are working in a separate environment from base.

With that the Package Plan finally offered conda=24.9.2, so the anaconda metapackage was definitely hindering the upgrades in some way.

CC BY-SA 4.0

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.