Skip to content

Installation

Important

Prerequisites#

Python version#

Flet requires Python 3.10 or later. (1)

  1. Check your Python version using python --version.

Operating System#

macOS#

Flet supports macOS 11 (Big Sur) or later.

Windows#

Flet supports 64-bit version of Microsoft Windows 10 or later.

Linux#

Flet supports Debian Linux 11 or later and Ubuntu Linux 20.04 LTS or later.

Windows Subsystem for Linux (WSL)

Flet apps can be run on WSL 2 (Windows Subsystem for Linux 2).

However, if you are getting cannot open display error follow this guide for troubleshooting.

Creating a virtual environment (venv)#

We recommend using a virtual environment for your Flet projects to keep dependencies isolated and avoid conflicts with your other Python projects.

First, create a new directory for your Flet project and switch into it:

mkdir my-app
cd my-app

Next, create and activate a virtual environment (we recommend using uv as package manager):

uv is "An extremely fast Python package and project manager, written in Rust".

Install uv if you haven't already, then run the following commands:

uv init --python='>=3.10'
uv venv
source .venv/bin/activate # (1)!
  1. If you are on Windows, use .venv\Scripts\activate instead.

Using Python's built-in venv module:

python -m venv .venv  # (1)!
source .venv/bin/activate # (2)!

  1. On Unix-like systems (Linux, macOS), use python3 -m venv .venv if python points to Python 2.x.
  2. If you are on Windows, use .venv\Scripts\activate instead.

Poetry is a Python dependency manager and package manager.

Install Poetry if you haven't already, then run the following commands:

poetry init --python='>=3.10' --no-interaction

Install Flet#

To install Flet and add it to your project dependencies, do the following depending on your package manager:

uv add 'flet[all]'
pip install 'flet[all]' # (1)!
  1. After this, you will have to manually add this package to your requirements.txt or pyproject.toml.
poetry add 'flet[all]'

Verify installation#

To make sure Flet has been installed correctly, we can check its version using the --version (or -V) flag or the doctor command:

uv run flet --version
# or
uv run flet doctor
flet --version
# or
flet doctor
poetry run flet --version
# or
poetry run flet doctor

Now you are ready to create your first Flet app.

Upgrade Flet#

To upgrade Flet to its latest version:

uv add 'flet[all]' --upgrade
pip install 'flet[all]' --upgrade
poetry add flet[all]@latest