anaconda – How to make pip do as well as conda in solving for python version during environment creation and update
One of the reasons I prefer conda is that, given a list of packages in a create, some of which depend on python:
mamba env create -f environment.yml
it will solve for and install the latest version of python that permits version alignment of all other packages. Moreover, one can at any time update the version of python if it becomes feasible to do so, by simply performing a conda update`:
mamba env update –file environment.yml –prune
Of course, this strategy fails when there is a package that only pip can provide via a - pip: section of environment.yml because conda isn’t smart enough to query and install while solving alignment, including packages in the - pip: section. Therefore, when one is confronted with a situation in which the only advantage of conda is such solving but in which there are some pip-only packages, one might wish to create a requirements.txt and perform the operations analogous to those in the examples above — including solving for and installing the correct version of python.
Is there a way to poerform these operations using pip other PyPi-aware environment managers — that is to say environment managers that can perform full version alignment among all listed packages so long as they are available at PyPi?
Read more here: Source link
