Reputation: 913
I've a conda install that's giving me an install of pysal
back on version 2.1.0 (it's currently 2.5.0) ... and I'm trying to figure out which of the 73 already installed packages has specified such an old version.
I know pydeps will find me the dependencies for a given package... all the packages required to run foo
- but I want to go the other way: what packages need foo
to be present (and the version they ask for would be nice.)
(I've got as far as recognising it's probably going to involve hunting through the json files in conda-meta
)
Upvotes: 1
Views: 274
Reputation: 1919
you can use pipdeptree:
pip install pipdeptree
pipdeptree
and get the dependencies in a tree form, like:
flake8==2.5.0
- mccabe [required: >=0.2.1,<0.4, installed: 0.3.1]
- pep8 [required: !=1.6.0,>=1.5.7,!=1.6.1,!=1.6.2, installed: 1.5.7]
- pyflakes [required: >=0.8.1,<1.1, installed: 1.0.0]
ipdb==0.8
- ipython [required: >=0.10, installed: 1.1.0]
one of the packages has installed this version but probably, it does not depend on this specific version, so you can also try to just install the most recent version and test if it works. Test and figure out dependencies is one of the reasons why we use virtual environments (like conda) so don't be afraid of break everything, if it happens, just save the env:
conda env export > your_env_name.yml
create the virtualenv again:
conda env create -f environment.yml
or just clone your current env to another before change it:
conda create --name current_env_name --clone backup_env
Upvotes: 1