# Virtual Environments & pip — Python

Source: https://www.geekswithgeeks.com/en/python/py-venv-pip

> Isolate each project's dependencies and manage packages with pip.

## Why isolate?

A **virtual environment** gives a project its own private set of installed packages, separate from your system Python.

```bash
python3 -m venv .venv
source .venv/bin/activate
pip install requests pandas
pip freeze > requirements.txt
pip install -r requirements.txt   # on another machine
```

## What to commit

Always commit `requirements.txt`, never the `.venv` folder itself — it's large and machine-specific.
