# How to use pip in a uv virtual environment

{{< callout type="warning" >}}
Only add [pip](https://pydevtools.com/handbook/reference/pip.md) to [uv](https://pydevtools.com/handbook/reference/uv.md) environments when specifically needed for compatibility with tools that directly call pip. For regular package management, continue using uv commands (`uv add`/`uv sync`), which offer better performance and reliability.
{{< /callout >}}

When working with [uv](https://pydevtools.com/handbook/reference/uv.md), you might occasionally need access to pip in your virtual environments, particularly when using tools that rely on pip directly, such as Jupyter's `%pip` magic command.

## Adding pip to a uv Virtual Environment

By default, uv virtual environments don't include pip. To create a virtual environment with pip installed:

```bash
uv venv --seed
```

To add pip to an existing virtual environment:

```bash
uv pip install pip
```

## Activating the Environment

Once you've created the environment with pip, activate it:

```bash
# On Unix/macOS
source .venv/bin/activate

# On Windows
.venv\Scripts\activate
```

Now you can use pip commands directly, e.g.,

```bash
pip list
```

## Learn more

- [uv: A Complete Guide](https://pydevtools.com/handbook/explanation/uv-complete-guide.md) covers what uv does, how fast it is, the core workflows, and recent releases.
