> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Install Prefect

Prefect is published as a Python package, which requires Python 3.11 or newer. We recommend installing Prefect in a Python virtual environment.

To install Prefect, run:

```bash pip theme={null}
pip install -U prefect
```

```bash uv theme={null}
# add prefect to an existing virtual environment
uv pip install prefect

# add prefect to your pyproject.toml
uv add prefect
```

To confirm that Prefect was installed successfully, run:

```bash pip theme={null}
prefect version
```

```bash uv theme={null}
uv run prefect version
```

You should see output similar to:

```bash theme={null}
Version:              3.4.24
API version:          0.8.4
Python version:       3.12.8
Git commit:           2428894e
Built:                Mon, Oct 13, 2025 07:16 PM
OS/Arch:              darwin/arm64
Profile:              local
Server type:          server
Pydantic version:     2.11.7
Server:
  Database:           sqlite
  SQLite version:     3.47.1
```

> [!NOTE]
>
> If you self-host a Prefect server, keep your client version compatible with the server (generally, client version less than or equal to server version). Prefect Cloud is compatible with all client versions. See [Versioning and compatibility](/docs/v3/release-notes/versioning.md) for the rules.

> **More commands for power users**
>
> ### If you use `uv`
>
> start an `ipython` shell with python 3.12 and `prefect` installed:
>
> ```bash theme={null}
> uvx --python 3.12 --with prefect ipython
> ```
>
> install prefect into a `uv` virtual environment:
>
> ```bash theme={null}
> uv venv --python 3.12
> source .venv/bin/activate
> uv add prefect
> ```
>
> add prefect to a project:
>
> ```bash theme={null}
> uv add prefect
> ```
>
> run prefect server in an ephemeral python environment with `uvx`:
>
> ```bash theme={null}
> uvx prefect server start
> ```
>
> ### If you use `docker`
>
> run prefect server in a container port-forwarded to your local machine's 4200 port:
>
> ```bash theme={null}
> docker run -d -p 4200:4200 prefecthq/prefect:3-latest -- prefect server start --host 0.0.0.0
> ```

## Windows installation

You can install and run Prefect via Windows PowerShell, the Windows Command Prompt, or [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/windows.html). After installation, you may need to manually add the Python local packages `Scripts` folder to your `Path` environment variable.

The `Scripts` folder path looks something like:

```bash theme={null}
C:\Users\MyUserNameHere\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\Scripts
```

Review the `pip install` output messages for the `Scripts` folder path on your system.

## Minimal Prefect installation

The `prefect-client` library is a minimal installation of Prefect designed for interacting with Prefect Cloud or a remote self-hosted Prefect server instance.

`prefect-client` enables a subset of Prefect's capabilities with a smaller installation size, making it ideal for use in lightweight, resource-constrained, or ephemeral environments.
It omits all CLI and server components found in the `prefect` library.

To install the latest release of `prefect-client`, run:

```bash theme={null}
pip install -U prefect-client
```

> [!NOTE]
>
> Prefect Cloud is compatible with all client versions. If you self-host a Prefect server, keep your client version compatible with the server (generally, client version less than or equal to server version). See [Versioning and compatibility](/docs/v3/release-notes/versioning.md) for the rules.

## Next steps

You also need an API server, either:

* [Prefect Cloud](/docs/v3/how-to-guides/cloud/connect-to-cloud.md), a managed solution that provides strong scaling, performance, and security, or
* [Self-hosted Prefect server](/docs/v3/concepts/server.md), an API server that you run on your own infrastructure where you are responsible for scaling and any authentication and authorization.

Now that you have Prefect installed, go through the [quickstart](/docs/v3/get-started/quickstart.md) to try it out.

See the full history of [Prefect releases](https://github.com/PrefectHQ/prefect/releases) on GitHub.

See our [Contributing docs](/docs/contribute/dev-contribute.md) for instructions on installing Prefect for development.
