# How to run the IPython shell in your uv project

When working with [uv](https://pydevtools.com/handbook/reference/uv.md) projects, you might want to use [IPython](https://pydevtools.com/handbook/reference/ipython.md) for interactive development without adding it to your project's dependencies. Running `uv run ipython` directly fails because IPython isn't installed in the project environment:

```
$ uv run ipython
error: Failed to spawn: `ipython`
Caused by: No such file or directory (os error 2)
```

### Option 1: Use IPython Temporarily with --with

Install IPython temporarily for the current session without adding it to your project dependencies:


```shell
uv run --with ipython ipython
```

> [!NOTE]
> This does not modify your [pyproject.toml](https://pydevtools.com/handbook/reference/pyproject.toml.md) or [lockfile](https://pydevtools.com/handbook/explanation/what-is-a-lock-file.md).

### Option 2: Add IPython as a Development Dependency

Add IPython to your project's development dependencies:

```shell
uv add --dev ipython
```

Then run it normally:

```shell
uv run ipython
```

> [!NOTE]
> This approach IPython to your pyproject.toml development dependencies and updates your lockfile for reproducible environments.

### Option 3: Install IPython Globally with uv tool

For system-wide IPython access across all projects:

```shell
uv tool install ipython
```

Then run it from any directory:

```shell
ipython
```

> [!WARNING] Globally installed IPython won't have access to your project's dependencies.

## 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.
