`conda list` filtered for pypi

In my conda environment, I had to resort to pip for some packages that were only available from pypi. Nonetheless, I’ve just realized that most dependencies for pypi packages are also available from conda-forge. I assume that it’d be better to reinstall those dependencies from conda-forge instead, in order to minimize the number of pypi packages.

Can I filter conda list for packages installed from pypi? If not, can pip list filter this way? Thanks.

I use the following command to inspect my envs:
conda env export > /tmp/pkg.lst
It will list the pip packages

You can just do conda list | grep pypi.

You can also use pip show <pkg> to see the dependencies of a pip package you have installed.

2 Likes