Virtual Environments & pip (Create, Activate, Freeze, Requirements) - Python Tutorial #27
5views
008:15
T
Taught by Celeste AI - AI Coding Coach
View on YouTubeDescription
Learn virtual environments in Python! š¦
In this lesson, you will learn:
ā
Why virtual environments matter for project isolation
ā
python3 -m venv to create isolated environments
ā
Exploring the venv directory structure
ā
activate and deactivate to switch environments
ā
pip install to add third-party packages
ā
pip list to see installed packages
ā
pip freeze to capture exact versions
ā
requirements.txt to share dependencies
ā
pip install -r to reproduce environments
ā
Mini Project: API Client using requests library
š Timestamps:
0:00 - Introduction
0:22 - venv Basics Explained
0:49 - venv Basics Demo
2:19 - pip & Requirements Explained
2:46 - pip & Requirements Demo
4:31 - Project Setup Explained
4:58 - Project Setup Demo
6:48 - Recap
7:23 - End
š» Source Code: https://github.com/GoCelesteAI/python_virtual_environments
š Code from this lesson:
# Create a virtual environment
python3 -m venv myenv
# Activate it
source myenv/bin/activate
# Install packages
pip install requests
# Save dependencies
pip freeze requirements.txt
# Reproduce on another machine
pip install -r requirements.txt
š Previous: Lesson 26 - Regular Expressions
š Next: Lesson 28 - Unit Testing
#Python #PythonTutorial #LearnPython #Programming #VirtualEnvironments #venv #pip #PythonBasics
---
The timestamps are calculated from the segment durations:
- Intro: 0:00ā0:22
- venv explanation: 0:22, demo: 0:49 (22+27=49s)
- pip explanation: 2:19 (49+83+7=139sā2:19), demo: 2:46 (139+27=166sā2:46)
- setup explanation: 4:31 (166+108-3=271sā4:31), demo: 4:58 (271+27=298sā4:58)
- recap: 6:48 (298+110=408sā6:48)
- end: 7:23 (408+35=443sā7:23)
Back to tutorialsOpen in YouTube
Duration
8:15
Published
February 10, 2026
Added to Codegiz
March 15, 2026