Installation
This page lists NVIDIA FLARE's requirements, every supported installation method, the optional dependency groups (extras), how to verify the installation, and how to fix common installation problems.
Requirements
| Requirement | Details |
|---|---|
| Python | 3.10 through 3.14 (python_requires >= 3.10). The nvflare command refuses to run on newer or older interpreters. |
| Operating system | Linux is the primary platform. macOS works, but some optional dependencies (tenseal, openmined.psi) are unavailable. Windows is not listed as supported. |
| pip | Recent pip; upgrading pip and setuptools inside the virtual environment is recommended. |
| Git | Needed only for installing from GitHub or from a source checkout. |
The core package depends on cryptography, grpcio, protobuf, numpy, psutil, PyYAML, requests, msgpack, docker, aiohttp, pydantic>=2, PyJWT, safetensors, certifi, uv, and packaging. Machine-learning frameworks are not installed by default; add them through extras.
Note: All participants of a federation (server, clients, and admin tools) must run the same NVFLARE version. There is no cross-version compatibility.
Create a Virtual Environment
A dedicated virtual environment per installation is strongly recommended:
python3 -m venv nvflare-env
source nvflare-env/bin/activate
python3 -m pip install -U pip setuptools
On Ubuntu you may first need sudo apt-get install python3-venv.
Install a Released Version
Stable releases are published on PyPI under the name nvflare:
python3 -m pip install nvflare
The repository README pins nvflare>=2.10.0 for the current quick start, because the nvflare examples command used there was introduced in 2.10.0:
python -m pip install "nvflare>=2.10.0"
If you use an earlier stable release, follow the documentation for that version; several commands described on this site do not exist before 2.10.0.
Install the Development Version
To get unreleased features, install directly from the main branch. pip manages a temporary checkout, so Git must be installed:
python -m pip install "git+https://github.com/NVIDIA/NVFlare.git@main"
main is the unstable development branch. Use a separate virtual environment for it.
Install from a Source Checkout
An editable install is useful when you want to modify NVFLARE itself:
git clone https://github.com/NVIDIA/NVFlare.git
cd NVFlare
pip install -e .
pip install -e ".[PT,SKLEARN]" # with extras
Release branches are named after major versions (2.1 through 2.7 and later); patch releases are tags on those branches. Switch with git switch 2.7, for example.
Note:
setup.pyderives the package version with Versioneer from Git metadata. If you build from a tree without Git metadata, the build fails unless you setNVFL_BASE_VERSION; the version then becomes<NVFL_BASE_VERSION>.dev<YYMMDD>.
Optional Dependencies (Extras)
Extras are defined in setup.cfg. Install one or several at once, for example pip install "nvflare[PT,TRACKING]".
| Extra | Installs | Use it for |
|---|---|---|
PT |
torch, torchvision |
PyTorch recipes and examples |
SKLEARN |
scikit-learn, pandas>=1.5.1 |
scikit-learn recipes, tabular statistics |
TRACKING |
mlflow, wandb, tensorboard |
experiment tracking receivers and writers |
MONITORING |
datadog |
system monitoring integration |
HE |
tenseal (Python < 3.14 only) |
homomorphic encryption |
PSI |
openmined.psi (Python < 3.14 only) |
private set intersection |
K8S |
kubernetes |
the Kubernetes job launcher |
dashboard |
Flask, Flask-JWT-Extended, Flask-SQLAlchemy, gunicorn | running the Dashboard locally |
edge-http |
Flask | the edge HTTP routing service |
app_opt |
HE, PSI, PT, SKLEARN, TRACKING, MONITORING, K8S, plus pytorch_lightning, xgboost<3.4, bitsandbytes |
all optional application dependencies (Linux) |
app_opt_mac |
PT, SKLEARN, TRACKING, K8S | macOS-compatible subset |
app_opt_cpu |
like app_opt without torch and bitsandbytes |
CPU-only environments (install CPU torch first) |
all / all_mac / all_cpu |
the matching app_opt* plus dashboard and edge-http |
everything for that platform |
test, dev (and _mac, _cpu variants) |
all plus test and documentation tooling |
contributing to NVFLARE |
doc |
Sphinx and extensions | building the official docs |
Note: On Python 3.14 the
HEandPSIextras install nothing, becausetensealandopenmined.psihave no 3.14 wheels yet. Use Python 3.13 or older if you need them.
Build a Wheel
python -m pip install build
python -m build --wheel
This produces dist/nvflare-<version>-py3-none-any.whl. To add extras to a local wheel, reference the same file: pip install "dist/nvflare-<version>-py3-none-any.whl[PT]". This avoids asking PyPI for a version that was never published.
The separate nvflight/ folder builds nvflare-light, a lightweight distribution that also provides nvflare Python modules. Keep it in its own environment.
Migrating from nvflare-nightly
Older source builds used the distribution name nvflare-nightly, which is retired. pip treats nvflare-nightly and nvflare as different distributions even though both install the nvflare modules, so installing one does not remove the other. Remove both before reinstalling:
python -m pip uninstall nvflare-nightly nvflare
python -m pip install -e ".[PT]"
The same applies to nvflare-light-nightly versus nvflare-light.
Verify the Installation
nvflare --version
The command prints a line of the form:
NVFlare version is 2.10.0
Then list the bundled example catalog (2.10.0 or later):
nvflare examples list
This reads the catalog shipped inside the package and does not contact GitHub. The Quick Start runs a complete simulated federation next.
Docker
The repository contains Dockerfiles under docker/, including docker/Dockerfile.parent, which accepts an NVFLARE_EXTRAS build argument (for example --build-arg NVFLARE_EXTRAS=K8S,dashboard). Container-based runtimes are described in Deployment Commands.
Troubleshooting Installation
| Symptom | Cause | Fix |
|---|---|---|
Python versions 3.15 and above are not yet supported. (or 3.9 and below are not supported) when running nvflare |
The CLI calls a version check before running any command. | Use Python 3.10 to 3.14. |
pip install nvflare[HE] succeeds but tenseal is missing |
You are on Python 3.14 or macOS. | Use Python 3.10-3.13 on Linux. |
RuntimeError: Versioneer could not determine the NVFlare package version |
Building from a tree without Git metadata. | Build from a Git checkout, or set NVFL_BASE_VERSION. |
| Odd import errors after switching builds | Both nvflare-nightly and nvflare are installed. |
Uninstall both, reinstall one, or use a fresh virtual environment. |
nvflare examples is an unknown command |
Installed version is older than 2.10.0. | Upgrade, or install from main. |
See Also
- Quick Start
- Contributing for development setup
- Release notes on GitHub