Python - Environments Flashcards

1
Q

What is a virtual environment

A

Virtual environments, in essence, are independent, isolated environments that manage their own libraries and packages. This means that when a project changes specific things in a library, other projects will not be affected. As such, it is also a great way to organize and compartmentalize your Python projects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What happens when you need 3 different virtual environments?

A

You can put separate libraries and interpreters in each venv
Intuitively, since Python virtual environments specify separate and isolated workspaces, they should also have separate interpreters as well. In the same lines as the preceding scenario, we can image situations where we have some projects in Python 2 and others in Python 3. In this case, having separate interpreters for different projects is a good thing to have.

The following illustration is an example of the separation of library and package dependencies among different Python projects on the same system:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly