가상 환경 설정

It is recommended to run your Python setup within a virtual environment. For framework development, uv creates and manages the virtual environment from the project lockfile. Tools such as pyenv or Anaconda can still provide the Python interpreter, but they do not need to create a separate project environment.

Python 버전

Flower requires at least Python 3.11.

참고

`Ray <https://docs.ray.io/en/latest/>`__와 호환되지 않는 것으로 알려져 있으므로, 현재 Flower 시뮬레이션을 실행할 때는 최대 `Python 3.11 <https://docs.python.org/3.11/>`_을 사용하는 것이 좋습니다.

Virtualenv with uv

From the repository root, run the bootstrap script:

./dev/bootstrap.sh

This creates framework/.venv with the repository’s default Python version and installs all framework dependencies from framework/uv.lock. To use a specific Python version, pass it as the first argument:

./dev/bootstrap.sh 3.11.14

Activate the created virtual environment with:

source framework/.venv/bin/activate

You can also run uv directly from the framework directory:

cd framework
uv sync --python=3.11.14 --locked --all-extras --all-groups

Python Versions with Pyenv

If you use pyenv, install the Python version you want uv to use:

pyenv install 3.11.14

Then pass that version to the bootstrap script:

./dev/bootstrap.sh 3.11.14

Python Versions with Anaconda

If you prefer conda, create and activate a Python environment, then let uv create the framework project environment. See the conda installation guide for installation instructions.

conda create -n flower-3.11.14 python=3.11.14
conda activate flower-3.11.14
./dev/bootstrap.sh 3.11.14