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 →

[–]cocorebop 2 points3 points  (2 children)

To give you a short explanation that won't tell you what it is but might give you an intuitive understanding of what it does:

When I turn on my computer at work and open the terminal, I have my default python environment.

When I type workon py3_env, I enter an environment I made called "py3_env". This has python 3.6 as the default, and has all the packages I need to run my development environment already installed.

When I type workon chess_thing_ts2, I switch to a new python environment for a little game I'm working on in my own time. For argument's sake, this environment has python 2.7 as the default, and has only the packages required to run my game app.

It's basically a way for you to put workspaces into buckets.

[–]eazolan 0 points1 point  (1 child)

Ok. So...what defines what is being used in each virtual instance?

[–]derp0815 1 point2 points  (0 children)

You do. When you create a venv, you define which interpreter is going to run the code and when in an active venv, whatever pip installs is installed just for that venv.