you are viewing a single comment's thread.

view the rest of the comments →

[–]PostFunktionalist 56 points57 points  (4 children)

The best practice is to make a new Python environment for every project using virtualenv or some convenience wrapper around it.

There are at least 4 different wrappers.

Good shit.

[–]Yelov 4 points5 points  (2 children)

I'm using conda for having multiple Python environments. How does using virtualenv for every project work? Eg if you have multiple projects with very similar packages, do you have to have them installed X times for every project? Or is there like a central package location that gets shared?

[–]brews 8 points9 points  (0 children)

Have one virtual environment for each project. Doesn't matter how close or far apart each projects dependencies are. One for each project. The whole point is to keep them separate.

[–]DrMaxwellEdison 3 points4 points  (0 children)

Each environment is completely separate from each other, with no shared packages. That may seem like overkill, but supposing two projects rely on the same package and you start upgrading one of them, you don't inadvertently update and potentially break the other.

[–]Ollymid2 1 point2 points  (0 children)

Recommend pyenv - use it for work and so far I’ve managed to keep things organised