Project: Prefect (Orchestration & Management / Scheduling & Orchestration)
File: installation.md

description: Installing Prefect and configuring your environment tags: installation pip install development Linux Windows SQLite upgrading search: boost: 2 Prefect requires Python 3.9 or newer. <p align="left"> <a href="https://pypi.python.org/pypi/prefect/" alt="Python Versions"> <img src="https://img.shields.io/pypi/pyversions/prefect?color=0052FF&labelColor=090422" /></a> <a href="https://pypi.python.org/pypi/prefect/" alt="PyPI version"> <img alt="PyPI" src="https://img.shields.io/pypi/v/prefect?color=0052FF&labelColor=090422"></a> </p> We recommend installing Prefect using a Python virtual environment manager such as `pipenv`, `conda`, or `virtualenv`/`venv`. You can use as your API server or backed by . For development, you can use 2.24 or newer as your database. is a managed solution that provides strong scaling, performance, and security. Learn more about Prefect Cloud solutions for enterprises . !!! info "Windows and Linux requirements" See and for details on additional installation requirements and considerations. The following sections describe how to install Prefect in your environment. Prefect is published as a Python package. To install the latest release or upgrade an existing Prefect install, and upgrade existing Python dependencies, run the following command in your terminal: <div class="terminal"> ```bash pip install -U prefect ``` </div> To install a specific Prefect version, specify the version number like this: <div class="terminal"> ```bash pip install -U "prefect==2.17.1" ``` </div> See available release versions in the . See our for instructions on installing Prefect for development and see the to install directly from the `main` branch. To confirm that Prefect was installed correctly, run the command `prefect version` in your terminal. <div class="terminal"> ```bash prefect version ``` </div> You should see output similar to the following: <div class="terminal"> ```bash Version: 2.17.1 API version: 0.8.4 Python version: 3.12.2 Git commit: d6bdb075 Built: Thu, Apr 11, 2024 6:58 PM OS/Arch: darwin/arm64 Profile: local Server type: ephemeral Server: Database: sqlite SQLite version: 3.45.2 ``` </div> You can install and run Prefect via Windows PowerShell, the Windows Command Prompt, or . 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 this (the username and Python version may be different on your system): ```bash C:\Users\MyUserNameHere\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\Scripts ``` Watch the `pip install` output messages for the `Scripts` folder path on your system. If you're using Windows Subsystem for Linux (WSL), see . Linux is a popular operating system for running Prefect. If you are hosting your own Prefect server instance with a SQLite database, note that certain Linux versions of SQLite can be problematic. Compatible versions include Ubuntu 22.04 LTS and Ubuntu 20.04 LTS. Alternatively, you can or use the `conda` virtual environment manager and configure a compatible SQLite version. If you're using a self-signed SSL certificate, you need to configure your environment to trust the certificate. You can add the certificate to your system bundle and pointing your tools to use that bundle by configuring the `SSLCERTFILE` environment

If the certificate is not part of your system bundle, you can set the `PREFECTAPITLSINSECURESKIP_VERIFY` to `True` to disable certificate verification altogether. *Note:* Disabling certificate validation is insecure and only suggested as an option for testing! Prefect supports communicating via proxies through environment variables. Whether you are using Prefect Cloud or hosting your own Prefect server instance, set `HTTPSPROXY` and `SSLCERT_FILE` in your environment, and the underlying network libraries will route Prefects requests appropriately. Alternatively, the Prefect library will connect to the API via any proxies you have listed in the `HTTPPROXY` or `ALLPROXY` environment variables. You may also use the `NO_PROXY` environment variable to specify which hosts should not be sent through the proxy. For more information about these environment variables, see the . The `prefect-client` library is a minimal installation of Prefect designed for interacting with Prefect Cloud or a remote self-hosted server instance. `prefect-client` enables a subset of Prefect's functionality 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. Install the latest version with: <div class="terminal"> ```bash pip install -U prefect-client ``` </div> By default, a local Prefect server instance uses SQLite as the backing database. SQLite is not packaged with the Prefect installation. Most systems will already have SQLite installed, because it is typically bundled with Python. !!! note Note that in production we recommend using as your API server or backed by . !!! info If you install the library that provides a limited set of the full Prefect library's functionality, you do not need SQLite installed. To install an appropriate version of SQLite on Red Hat Custom Linux (RHEL), follow the instructions below: <details> <summary>Expand for instructions</summary> Note that some RHEL instances have no C compiler, so you may need to check for and install `gcc` first: <div class="terminal"> ```bash yum install gcc ``` </div> Download and extract the tarball for SQLite. <div class="terminal"> ```bash wget https://www.sqlite.org/2022/sqlite-autoconf-3390200.tar.gz tar -xzf sqlite-autoconf-3390200.tar.gz ``` </div> Move to the extracted SQLite directory, then build and install SQLite. <div class="terminal"> ```bash cd sqlite-autoconf-3390200/ ./configure make make install ``` </div> Add `LDLIBRARYPATH` to your profile. <div class="terminal"> ```bash echo 'export LDLIBRARYPATH="/usr/local/lib"' >> /etc/profile ``` </div> Restart your shell to register these changes. Now you can install Prefect using `pip`. <div class="terminal"> ```bash pip3 install prefect ``` </div> </details> To use the most up-to-date, unreleased Prefect code, you can install directly off the `main` GitHub branch: <div class="terminal"> ```bash pip install -U git+https://github.com/PrefectHQ/prefect ``` </div> !!! warning "The `main` branch may not be stable" Please be aware that this method installs unreleased code and may not be stable. Now that you have Prefect installed and your environment configured, check out the to get more familiar with Prefect.