I have a lot (several tens) of conda environments. I need to install a new package. I'd prefer not to create a new environment specifically for it, but rather find an existing one that requires minimum change to install the package into it. How do I do this programmatically (without manually checking each environment)?
I could imagine obtaining package dependencies, then comparing environments pairwise with conda compare
and parsing the results, but this would be quite a dirty solution. I imagine something like a command or package doing so. Tried to look out in conda docs, but found nothing.