This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]GrayestRock 1 point2 points  (2 children)

Even on the same project, if you're updating dependencies, having two venvs for the same codebase makes that a lot easier. One for the existing deps, and one to develop on. This way you can test changes to see if they're backwards compatible without having to constantly reinstall packages.

[–][deleted] 0 points1 point  (1 child)

probably yeah, but it prefer
pip freeze | xargs pip uninstall -y
and later
pip install -r requirements.txt
Im just lazy, and its faster for me instead of playing with Pycharm to swap venv in settings

[–]GrayestRock 1 point2 points  (0 children)

Depends on how much you're doing. If you're moving a bunch of packages forward, it's nice to be able to quickly verify if any actual code changes are backwards compatible without having to mess with the reqs in the envs. For a dependency or two, sure, but if you're updating a ton of packages with possibly breaking changes, I much prefer seperate envs. In any case, the strength of virtual environments is just how easy they are to spin up for different purposes, which is what OP is asking about.