Setting dependencies for pip-only package via cond

Sometimes I need to install the pip-only package in a conda environment. If I install the package using pip install, then all the dependencies for this package are installed using pip, even if they are available for conda.

I would like to install as many packages as possible through conda, so I am currently using hack to get a list of package dependencies through pip, search for all of them on the cond, conda installthose that are found, and then go through pip install.

Do I prefer to install dependencies via cond rather than pip? And if so, can anyone think of a more elegant way to solve this problem?

+4
source share
1 answer

pip and conda are two separate package managers. Only in very rare cases, package managers actually work together. In practical applications, cond and pip are usually not.

In fact, mixing conda and pip packages is usually inevitable. This often leads to confusing package management as you describe.

In my opinion, the best and currently the only way to solve this problem is to create a conda package for all (pypi-) packages and dependencies that you want to use in your conda environments.

conda-forge is a community that offers an easy way to contribute your own package to the conda infrastructure. You might want to check if your package is available, and if not, if input is an option for you.

+1

Source: https://habr.com/ru/post/1662708/


All Articles