This class teaches you to use venv Virtual Environments with Python.
- 00:00 Intro
- 06:33 What Virtual Environments Mean
- 12:46 Basics of venv
- 22:02 Creating and Using venv Virtual Environments
- 35:23 Using requirements.txt Files
- 40:49 Security Concerns with venv
- 43:50 Final Thoughts
Install venv on Ubuntu
sudo apt install python3-venv
Create a Virtual Environment
python -m venv test-venv
Activate Virtual Environment
source test-venv/bin/activate
Deactivate Virtual Environment
deactivate
Create a Requirements.txt File (Do this inside of activated Virtual Environment)
pip3 freeze > requirements.txt
Install Packages from Requirements.txt File (Do this inside of activated Virtual Environment)
pip3 install -r requirements.txt
Be the first to comment