Replies: 3 comments
-
Here are some excerpts from another thread I observed. Personally I've only tried venv and need very explicit instructions of how to do so...
|
Beta Was this translation helpful? Give feedback.
-
Actually all of the answers to the poll should be "I have not heard of these" since I have a typo in "virtual." I have not heard of vitual environments. I cannot fix it unless I reset the poll, so this typo will just persist. |
Beta Was this translation helpful? Give feedback.
-
Thanks for starting this thread! Virtual environments are super important, but a real minefield. What are they? This is a really good blog post explaining the Python situation: https://alpopkes.com/posts/python/packaging_tools/. It nicely explains why there are so many different virtual environment (+ package management, depedency management, package building, etc...) tools out there and what their strengths are. It's about much more than virtual environments, but I kind of feel you have to touch on the other aspects to get a full understanding of what virtual environments are all about. The only thing that post misses is that there is a new package manager on the block that solves a lot of the issues around Conda. It's called Pixi: https://pixi.sh/latest/ (developed by the folks that developed mamba). It kind of takes the best bits of Conda and pip and brings them together, except they've re-written everything to be super fast. I honestly think Pixi will be the future of package management. What's the simplest way to get started? It's personal preference, but my advice would be to pick a environment manager (maybe based on that blog I linked to, or my random thoughts below) and dive in. Every time you start a new project (i.e. a new bit of code), force yourself to use the environment manager to create a new virtual environment. Treat them as ephemeral - don't be afraid of deleting them and re-creating them on a whim. That's the whole beauty of them. Soon you'll be wondering how you ever survived without them. Will I be perceived as really cool if I use them? Yes 😎 A few other random thoughts:
|
Beta Was this translation helpful? Give feedback.
-
Who uses virtual environments? At a previous CSDMS Annual Meeting, the Terrestrial Working Group discussion, the topic of virtual environments came us as one we'd like to learn more about!
Example real conversation:
Person 1: I've heard about virtual environments, but what's the difference between that and regular environments?
Person 2: Mark and Eric are always telling me to use virtual environments and how useful they are. But I just use my standard python environment.
Person 1: Yeah, me too, I just pip install stuff when it tells me to!
Person 2: Me too!!
Take the poll below to let us know if you are interested in learning more, and leave a comment if you have a link or tip to help us collectively use virtual environments more efficiently.
We are interested to hear:
8 votes ·
Beta Was this translation helpful? Give feedback.
All reactions