Virtual Environments & pip (Create, Activate, Freeze, Requirements) - Python Tutorial #27

5views
00
8:15
T
Taught by Celeste AI - AI Coding Coach
View on YouTube
Description
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 tutorials

Duration

8:15

Published

February 10, 2026

Added to Codegiz

March 15, 2026

Open in YouTube