Christopher Short
Christopher Short

Reputation: 657

why does conda update downgrade some libraries

For m, on OS X, conda update --all often downgrades libraries - along with updating many.

Is this usual? Or something possibly in my setup?

Earlier this year, it was pillow for many months.

Surprisingly, today it was several of the HDF5 related libraries, numba and llvmlite.

So conda update numba brings numba back to the most recent version, and so on with the other 8 libraries, but why doesn't conda update --all do this anyway?

Upvotes: 47

Views: 22724

Answers (2)

Ringil
Ringil

Reputation: 6537

It's a compatibility issue. Anaconda is a stable set of packages. When you update Anaconda, you update to this stable list.

However, when you update individual packages, they might cause incompatibility issues with the rest of the Anaconda distribution so they aren't considered stable. That's why when you use conda update --all, it gets you to the latest stable Anaconda distribution, which might or might not have the version of the individual package you wanted.

See here: https://github.com/ContinuumIO/anaconda-issues/issues/39

Edit: This behavior has changed. It now tries to increase the version of all packages (except Python between major/minor version) such that no packages will be incompatible with each other.

See here: http://continuum.io/blog/advanced-conda-part-1#conda-update-all

Upvotes: 35

asmeurer
asmeurer

Reputation: 91550

Some libraries depend on specific lower versions for compatibility purposes. conda update --all will try to update packages as much as possible, but it always maintains compatibility with the version restrictions in each package's metadata. Note that the anaconda package does not come into play here (assuming you have a recent version of conda), because conda update --all ignores it.

Unfortunately, it's not always easy to see what depends on what, but there are some tricks. One way is to pin each package to a version you want and running conda update --all. It should generate an unsatisfiability hint that will give you an idea of what is causing the problem. Another way is to search through the package metadata.

For numba, I can suggest that the problem is likely related to numbapro. There are a few packages that depend on hdf5. You can use conda info <package> to see the dependencies of a package (like conda info h5py).

Upvotes: 11

Related Questions