Skip to main content
Loading page…
Python Mastery
Chapter 1
Lesson 5 of 5
Virtual Environments, pip & uv
Contents
Notes
Tutor
Concept
The Problem: Dependency Hell
Loading activity…
Previous
1 / 11
Continue
Contents
Notes
Discussion
Tutor
30 min
11 activities
0 of 11 done
In this lesson
1
The Problem: Dependency Hell
2
Creating and Activating a Virtual Environment
3
pip: Installing, Listing, and Removing Packages
4
requirements.txt: Pinning Dependencies
5
requirements.txt Is the Starting Point, Not the Final Answer
6
Bridge: Installing vs Importing a Package
7
Practice: Using an Installed Package
8
Check: Identifying the Active Environment
9
Never Commit the venv/ Folder
10
Sort: What Goes in the Project? What Stays Out?
11
Explain the venv Activation Process
Objectives
Explain why virtual environments are essential for Python projects
Create and activate a virtual environment on Windows, macOS, and Linux
Install, list, and pin packages with pip
Create and use a requirements.txt file for reproducible environments
Further reading
venv - Creation of virtual environments
Installing Python packages
uv projects guide
Chapter 1 · Getting Started: Your Python Workshop
What Python Is and Why It Wins
Installing Python & Running Your First Program
Terminal Essentials for Developers
A Pro Setup with VS Code, Ruff & uv
Virtual Environments, pip & uv
Previous: A Pro Setup with VS Code, Ruff & uv
Next: Variables, Objects & Assignment