# How to Run a Python REPL with uv

{{< callout type="info" >}}
uv does not currently officially support a system-level installation of Python, however,
you can try it in [preview mode](https://pydevtools.com/handbook/how-to/how-to-add-python-to-your-system-path-with-uv.md).
{{< /callout >}}

To start an interactive Python REPL (Read-Eval-Print Loop) session using uv:

```console
$ uv run python
```

This command will:
1. Create or use an existing virtual environment if in a project (i.e. the project has a [pyproject.toml](https://pydevtools.com/handbook/reference/pyproject.toml.md) file)
2. Install any required dependencies
3. Launch an interactive Python session

## Using a Specific Python Version

To run the REPL with a particular Python version:

```console
$ uv run --python 3.12 python
```

If the requested Python version is not installed, uv will download and install it automatically.

## Running the REPL with Additional Dependencies

To run Python with specific packages available:

```console
$ uv run --with pandas --with numpy python
```

This will create an isolated environment with the requested packages installed before launching the REPL.

## Running the REPL Isolated from a Project

When working in a project directory but wanting to run a clean REPL without project dependencies:

```console
$ uv run --no-project python
```

{{< callout type="info" >}}
If you need regular access to a Python REPL, you could install IPython on the system level with `uv tool install ipython`. uv does not currently support a system-level installation of Python.
{{< /callout >}}
