Python Virtual Environments: Video Tutorial
This video shows you how to create virtual environments in Mac/Linux/Windows. We also include a demo of a new feature in VS Code that works great with them, so you don’t have to set up the interpreter.
Note that the commands you need, the slides from the video, and additional resources are listed below (under the video).
https://youtu.be/b_j-iX0caHA
Virtual Environment Commands (Mac and Linux)
# Create the environment
python -m venv venv
# Activate it
source venv/bin/activate
# Use it
pip install ...
python ...
# Deactivate
deactivate
Virtual Environment Commands (Windows)
# Create the environment
python -m venv venv
# Activate it
venv/Scripts/activate
# Use it
pip install ...
python ...
# Deactivate
deactivate