How to Install prefect in Python

v3.6.26 General Purpose Python <3.15,>=3.10 Apache-2.0

Workflow orchestration and management.

Install pip install prefect

What is prefect?

Workflow orchestration and management.

Prefect is a workflow orchestration framework for building data pipelines in Python. It's the simplest way to elevate a script into a production workflow. With Prefect, you can build resilient, dynamic data pipelines that react to the world around them and recover from unexpected changes.

With just a few lines of code, data teams can confidently automate any data process with features such as scheduling, caching, retries, and event-based automations.

Workflow activity is tracked and can be monitored with a self-hosted Prefect server instance or managed Prefect Cloud dashboard.

Quick Start

Minimal example to get started with prefect:

import prefect

print(prefect.__version__)

Installation

pip (standard)

pip install prefect

Virtual environment (recommended)

python -m venv venv
source venv/bin/activate   # Windows: venv\Scripts\activate
pip install prefect

pip3

pip3 install prefect

conda

conda install -c conda-forge prefect

Poetry

poetry add prefect

Dependencies

Installing prefect will also install these packages:

Verify the Installation

After installing, confirm the package is available:

python -c "import prefect; print(prefect.__version__)"

If this prints a version number, installation succeeded. If you see a ModuleNotFoundError, see the errors section below.

Installation Errors

Common errors when installing prefect with pip.

ModuleNotFoundError: No module named 'prefect'

Cause: The package is not installed in the current Python environment.

Fix: Run pip install prefect. If using a virtual environment, ensure it is activated first.

ModuleNotFoundError: No module named 'prefect' (installed but still failing)

Cause: pip installed the package into a different Python than the one running your script.

Fix: Use python -m pip install prefect to install into the interpreter you are running.

ImportError: cannot import name 'X' from 'prefect'

Cause: The function or class does not exist in the installed version.

Fix: Check the version with pip show prefect and upgrade with pip install --upgrade prefect.

pip: command not found

Cause: pip is not in PATH or Python was not added to PATH during installation.

Fix: Try python -m pip install prefect. On macOS/Linux try pip3.

PermissionError: [Errno 13] Permission denied

Cause: No write access to the system Python package directory.

Fix: Use a virtual environment, or add --user: pip install --user prefect

SSL: CERTIFICATE_VERIFY_FAILED

Cause: pip cannot verify PyPI's SSL certificate — common behind corporate proxies.

Fix: Try: pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org prefect

Recent Releases

VersionReleased
3.6.27.dev1 2026-04-11
3.6.26 latest 2026-04-10
3.6.26.dev6 2026-04-10
3.6.26.dev5 2026-04-09
3.6.26.dev4 2026-04-08

Full release history on PyPI →

Manage prefect

Upgrade to latest version

pip install --upgrade prefect

Install a specific version

pip install prefect==3.6.26

Uninstall

pip uninstall prefect

Check what is installed

pip show prefect

Last updated: 2026-04-11 • Data from PyPI