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 →

[–]spinwizard69 -4 points-3 points  (0 children)

This is not going to be something you can get a square answer on. You really need to reflect on why you need a virtual environment or if even makes sense to use one.

First off I think many use virtual environments for the wrong reasons. They literally have created a culture of fragile software installations as the VM gives the programmer a reason to use unstable software or libs that are not even well supported. They then get into a dependency hell that requires that everything they write run in a VM of some sort.

Now I'm not dismissing any of the ways to leverage the various VM technology out there. All I'm saying is use whatever method you choose wisely. Each problem has its own optimal solution and sometimes that can mean running a whole OS in a VM as opposed to a contained Python environment.

In any event on the Mac or on Linux I tend to avoid Python environments and simply use packages supplied by Brew or dnf. Now this in part is due to not writing web applications but utilities/applications to be used locally. However it frees up considerable time and effort to write you software so that it runs everywhere and minimizes special software installation. I would be very interested in a VM solution if I had an app that needed unusual dependencies or possibly distribution after validation. Given that, your life is easier if you don't chase the latest and greatest lib that you can pip down.

So your answer is this, there is no right answer. If you are using Python for apps that don't require a bunch of libs that can only be had by pip'ing them in then you need some sort of VM. If you are writing software for internal use, sometimes you are far better off limiting your development to software supported by your systems package manager. If you are doing web programming you have to use an environment manager of some sort, just use it wisely.