5 ms·
Regarding why not your home directory: which version of Foo do you install, the one that Project A needs or the incompatible one that Project B needs? The bril
by kstrauser 10mo ago
Regarding why not your home directory: which version of Foo do you install, the one that Project A needs or the incompatible one that Project B needs?
The brilliant part about venvs is that A and B can have their completely separate mutually incompatible environments.
- andoando 10mo agoWhy can't we just have something like npm/gradle/maven dependencies? What makes python any different?
- lexicality 10mo agoA python virtualenv is just a slightly more complicated node_modules. Tools like PDM, Poetry and uv handle them automatically for you to the point where it effectively is the same as npm. The thing that makes Python different is that it was never designed with any kind of per-project isolation in mind and this is the best way anyone's come up with to hack that behaviour into the language.
- deleted 10mo ago[deleted]
- kevin_thibedeau 10mo agoThey have their place. But the default shouldn't force you into a "project" when you want general purpose applicability. Python should work from the shell as readily as it did 20 years ago. Not mysteriously break what used to work with no low-friction replacement.
- gorgolo 10mo agoPython can work from the shell, if you don’t have external dependencies. But once you have external dependencies, with incompatible potential versions, I just don’t see how you could do this with “one environment”.
- fastasucan 10mo agoIt does work from the shell.