pythoncondaminiconda

Conda update flips between two versions of the same package from the same channel


This is the continuation of my previous question.

Now, with both channel_priority: flexible and channel_priority: strict, every conda update -n base --all flips between

The following packages will be UPDATED:

  libarchive                               3.7.2-h313118b_1 --> 3.7.4-haf234dc_0
  zstd                                     1.5.5-h12be248_0 --> 1.5.6-h0ea2cb4_0

The following packages will be DOWNGRADED:

  zstandard                          0.22.0-py311he5d195f_0 --> 0.19.0-py311ha68e1ae_0

and

The following packages will be UPDATED:

  zstandard                          0.19.0-py311ha68e1ae_0 --> 0.22.0-py311he5d195f_0

The following packages will be DOWNGRADED:

  libarchive                               3.7.4-haf234dc_0 --> 3.7.2-h313118b_1
  zstd                                     1.5.6-h0ea2cb4_0 --> 1.5.5-h12be248_0

and the corresponding conda list -n base --show-channel-urls are

libarchive                3.7.2                h313118b_1    XXX
zstandard                 0.22.0          py311he5d195f_0    XXX
zstd                      1.5.5                h12be248_0    XXX

and

libarchive                3.7.4                haf234dc_0    XXX
zstandard                 0.19.0          py311ha68e1ae_0    XXX
zstd                      1.5.6                h0ea2cb4_0    XXX

where XXX is the exact same (internal/corp) channel (which I do not cotrol).

What am I doing wrong? How do I avoid this?

Is this a bug in conda 24.5.0 or in the configuration of the XXX channel?

PS. Reported


Solution

  • I cannot fully replicate the behavior that you are experiencing, so your mileage may vary with this solution. Conda has a config feature that allows you to pin package specs. This feature is still in beta according to the conda docs, so it may change in the future.

    First add the package pinning to your conda config:

    conda config --append pinned_packages "zstandard>=0.22.0"
    

    Then install the newest version of zstandard and downgrade the other two packages.

    conda install zstandard==0.22.0 libarchive==3.7.2 zstd==1.5.5
    

    Finally check the upgrade again:

    conda update -n base --all