[Tutor] Using venv
Juan C.
juan0christian at gmail.com
Sat Feb 4 12:44:57 EST 2017
On Fri, Jan 27, 2017 at 7:47 PM, Jim <jf_byrnes at comcast.net> wrote:
>
> [...] This question seems a little dumb and maybe I am being a little dense, but then what?
Imagine that you are working on 5 different Python projects, each
using different packages with different versions. We can break this
down in two situations:
1. No virtualenv
1.a. You only have one Lib/site-packages to hold all your packages
1.b. Project A uses package-abc 1.2 while Project B uses package-abc 1.5
1.c. You go to work on Project B using package-abc 1.5, but later on
you have to do some changes on Project A so you must downgrade
package-abc to 1.2. Too bad you have to fix some bugs on Project B the
next day, need to update package-abc back to 1.5
2. Virtualenv
2.a. You had multiple virtualenvs, each of them having their own
Lib/site-packages
2.b. Project A uses one virtualenv with package-abc 1.2 while Project
B uses another virtualenv with package-abc 1.5
2.c. You go to work on Project B using package-abc 1.5, so you
activate its venv, but later on you have to do some changes on Project
A so you activate the other venv. Too bad you have to fix some bugs on
Project B the next day, activate Project B venv.
It's a simple command to activate/deactivate a venv vs all the work
you have to do when not using venv.
More information about the Tutor
mailing list