Reputation: 4387
I'm trying to understand the difference (benefits/detriments) to using virtualenv versus a local python installation. I have a number of python modules that have been developed which have a number of python dependencies (e.g., numpy, scipy, nose, etc.). One path to deploy this is to use virtualenv and then to install them in the virtualenv, the problem I foresee with this is that users can have antiquated pythons. The other option, bundle python 2.7 and then install the applications in the local site-library of that python 2.7.
If the python versions were the same do these two alternatives end up with the same solution?
thanks, jim
Upvotes: 1
Views: 271
Reputation: 5161
If you're looking at it in terms of deploying a standalone application to users that may or may not have the correct (or any) version of Python installed, then of course it makes more sense to bundle your module and its dependencies with the required version of Python.
The point of virtualenv is that you can have a sandboxed version of Python that won't junk up your local installation no matter what you do to it. If you want to install 12 dependencies to experiment with something and then wipe it all when you're done, it's no problem. If you have four applications on a web server that were developed using three different versions of the same library, you don't have to cross your fingers and force them all to use the most recent one.
Upvotes: 2