Flet Installation Guide
Prerequisites
cannot open display issues.Virtual Environment Setup
It is recommended to use a virtual environment for Flet projects.
1. **Create Project Directory:**
mkdir my-app
cd my-app
2. **Create and Activate Virtual Environment:**
* **Using uv (Recommended):**
uv init --python='>=3.10'
uv venv
source .venv/bin/activate
* **Using Python's venv:**
python -m venv .venv
source .venv/bin/activate
(On Windows, use .venv\Scripts\activate)Installing Flet
Install Flet and add it to project dependencies:
uv:** uv add 'flet[all]'
pip:** pip install 'flet[all]'
*Note: After using pip, manually add flet[all] to requirements.txt or pyproject.toml.Verifying Installation
Check the installation using the --version flag or the doctor command:
uv:** uv run flet --version
# or
uv run flet doctor
flet --version
# or
flet doctor
Upgrading Flet
To upgrade Flet to the latest version:
uv:** uv add 'flet[all]' --upgrade
pip:** pip install 'flet[all]' --upgrade
After successful installation, you are ready to [create your first Flet app](https://docs.flet.dev/getting-started/create-flet-app/).
Previous
arrow_back
Create flet app