DEV Community

Discussion on: Python Tools for Managing Virtual Environments

Collapse
 
yarongon profile image
yarongon

Great read!
I'm currently using miniconda for managing both Python versions and virtual environments. I'd like to move to Poetry for managing virtual envs, however, as far as I understand, Poetry's virtual envs are coupled with the directory. What I like about miniconda is that the virtual envs are decoupled from the directory. You simply conda activate it.
Do know if Poetry can work like that?

Collapse
 
bowmanjd profile image
Jonathan Bowman • Edited

That is my understanding as well: Poetry is for project management. A project lives in a directory. And the project gets its own virtual environment.

In other words, they are solving slightly different problems.

If you are primarily interested in managing environments with different Python versions, you may be interested in coupling Poetry with pyenv, and utilizing the poetry env command.

You can read a fuller explanation in the Poetry docs.

Collapse
 
plastikfan profile image
Plastikfan

What do you mean by project management? Do you mean building the package, linting, running tests, etc, as opposed to managing the environment? This needs to be explicit because the difference between poetry and say conda is very subtle and I am trying to really understand the difference between the 2. Since poetry can manage a project's environment, does that mean we can have a conda env at the same time as a poetry project env? In this scenario, the developer would install a projects deps into the poetry env, and then install wider dependencies into the conda env. Does that make sense or is it total rubbish!?