Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find which library prevents updating a package in conda?

I have set up couple of environments with Data Science libraries like pandas, numpy, matplotlib, scikit-learn, tensorflow etc..

However I cannot update some packages to the latest version.

E.g.

conda update pandas

will tell me I have the latest version available however I know for sure the latest version is 1.+ (mine is 0.25)

Is there a way to see which packages prevent a specific package from updating?

like image 201
Sergey Bushmanov Avatar asked Apr 04 '20 12:04

Sergey Bushmanov


1 Answers

There is a way to do it using the drop-in replacement mamba.

All you have to do is provide the version of the package you want to update to, and mamba will tell you what's preventing it from updating.

E.g., in my case, I wanted to update snakemake to version > 7. But mamba update snakemake only gave me 6.15.

So I ran: mamba install snakemake=7, and the result was informative:

Looking for: ['snakemake=7']

Pinned packages:
  - python 3.8.*
  - bcbio-gff 0.6.7.*


Encountered problems while solving:
  - nothing provides yte >=1.0,<2.0 needed by snakemake-minimal-7.0.0-pyhdfd78af_0

It turns out I had forgotten to include -c conda-forge which is where yte was to come from.

like image 190
Cornelius Roemer Avatar answered Nov 04 '22 00:11

Cornelius Roemer