Skip to main content
Prefect is published as a Python package, which requires Python 3.10 or newer. We recommend installing Prefect in a Python virtual environment. To install Prefect, run:
To confirm that Prefect was installed successfully, run:
You should see output similar to:
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 for the rules.

If you use uv

start an ipython shell with python 3.12 and prefect installed:
install prefect into a uv virtual environment:
add prefect to a project:
run prefect server in an ephemeral python environment with uvx:

If you use docker

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

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:
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:
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 for the rules.

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.