Back to Prefect

Install Prefect

docs/v3/get-started/install.mdx

3.6.30.dev33.3 KB
Original Source

import Installation from '/snippets/installation.mdx'

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

<Installation />

To confirm that Prefect was installed successfully, run:

<CodeGroup>
bash
prefect version
bash
uv run prefect version
</CodeGroup>

You should see output similar to:

bash
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
<Accordion title="More commands for power users">

If you use uv

start an ipython shell with python 3.12 and prefect installed:

bash
uvx --python 3.12 --with prefect ipython

install prefect into a uv virtual environment:

bash
uv venv --python 3.12
source .venv/bin/activate
uv add prefect

add prefect to a project:

bash
uv add prefect

run prefect server in an ephemeral python environment with uvx:

bash
uvx prefect server start

If you use docker

run prefect server in a container port-forwarded to your local machine's 4200 port:

bash
docker run -d -p 4200:4200 prefecthq/prefect:3-latest -- prefect server start --host 0.0.0.0
</Accordion>

Windows installation

You can install and run Prefect via Windows PowerShell, the Windows Command Prompt, or conda. 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
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
pip install -U prefect-client

Next steps

You also need an API server, either:

  • Prefect Cloud, a managed solution that provides strong scaling, performance, and security, or
  • Self-hosted Prefect server, 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 to try it out.

See the full history of Prefect releases on GitHub.

See our Contributing docs for instructions on installing Prefect for development.