virtual environments

References

Summary

A python environment is the root directory of the python installation

A real environment occurs when you actually install python

What happens if you want a new root? If you make a real environment, it's going to use a lot of resources. This is where virtual environments come in

A virtual environment is cheaper to set up and tear down

Since virtual environments are so cheap, if something goes wrong, you usually just delete the whole thing

Typically one installs all the packages they need as soon as the VE is created

You create VE using venv

python -m venv <directory>

virtualenvwrapper is a package that adds some useful features

Some other benefits of VE

Containers

Similar to VEs, but for collections of programs

Docker is a common tool for making containers

Virtual Machines

Are the analogue with multiple operating systems