Reputation: 1048
When I use conda environments I often find myself using packages that are only on PyPI requiring pip to install them, but for which many of the dependencies could be installed using conda. If I just install them using pip I'll end up with an environment with several pip-managed packages.
Currently I have to start a pip install (say for torchkge
), and notice that it requires for instance pandas
and starts downloading it. I ctrl+C
and then conda install pandas
before redoing the pip install until I see that pip sees that all of the dependencies are satisfied and none need to be installed.
Is there a simple way of doing this dependency check and installing the available dependencies with conda?
Upvotes: 1
Views: 227
Reputation: 2076
You can use below command. For example if I need to check dependencies of Pandas:
pip show pandas
In result set you will find the modules required under Requires
keyword.
OR
You can also use pipdeptree
$ pip install pipdeptree
then run
$ pipdeptree
and it will show you your dependencies in a tree form.
For pandas you can check:
$ pipdeptree -p pandas
Upvotes: 1