Python Learning Series · @onlysamarrr · Day 29 / 30
Day 29 is about pip and virtual environments, not Python code. pip installs packages, and a venv gives each project its own isolated environment so package versions never clash between projects.
Phase: Intermediate · Reels: 141/450 – 145/450
Day 29 is about pip and virtual environments, not Python code. pip installs packages, and a venv gives each project its own isolated environment so package versions never clash between projects.
python -m venv .venv source .venv/bin/activate # Windows: .venv\Scripts\activate pip install requests pip freeze > requirements.txt pip install -r requirements.txt deactivate
Day 29 is about terminal commands, so there is no Python output. Run the commands in your computer's terminal, in order.
Every professional Python project uses a venv plus requirements.txt so teammates get the same setup.
Select (tick) an option, then tap Check answer to see instantly whether your answer is right or wrong, with an explanation. You can change your answer and check again.
Q1. What does python -m venv .venv create?
Q2. What does pip freeze > requirements.txt do?
Q3. What does pip install -r requirements.txt do?
| 141/450 | Concept | pip kya hai |
| 142/450 | Live demo | venv banao demo |
| 143/450 | Common mistake | Global install ki galti |
| 144/450 | Quiz | Quiz: requirements.txt |
| 145/450 | Interview / real life | Interview: venv kyun |