Installation
Important
Prerequisites#
Python version#
Flet requires Python 3.10 or later. (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:
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:
- If you are on Windows, use
.venv\Scripts\activate
instead.
Using Python's built-in venv
module:
- On Unix-like systems (Linux, macOS), use
python3 -m venv .venv
ifpython
points to Python 2.x. - 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:
Install Flet#
To install Flet and add it to your project dependencies, do the following depending on your package manager:
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:
Now you are ready to create your first Flet app.
Upgrade Flet#
To upgrade Flet to its latest version: