[Python] Can conda import a different environment or allow you to switch between environments...

Discussão em 'Python' iniciado por Stack, Junho 4, 2025.

  1. Stack

    Stack Membro Participativo

    I am starting to get the hang of Conda and it's been a game changer for all the things that need specific versions of packages to play along. Sometimes these requirements are in different domains so inside of my scripts folder I have folders like "CV" or "GUI" or "PDFs" or "Searching" and have created a condo environment that makes sense for each of them. Each of these have building block scripts that are very useful but don't do much on their own. I intend to use them across multiple projects/scripts.

    With that in mind, I do have a few scripts that run scripts from multiple of these folders and thus multiple of these environments.

    I figured it would be smart to keep the folders and their environments separate but perhaps I am asking for trouble since I know I will in some cases want to use a script from a different environment/folder.

    I guess the question is whether I am organizing/thinking about this right and if so how to get a conda environment that works for the script that runs scripts that may belong to separate python environments. Would be really cool if the environment could change just based on the script being imported. It would be nice if there were a way to like create an environment that was a combination of multiple environments and then manually deal with any conflicts.

    Continue reading...

Compartilhe esta Página