From 38e86b58d8088e5d36f376a4c3b8f48c7347ae09 Mon Sep 17 00:00:00 2001 From: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com> Date: Mon, 8 Jun 2026 19:49:24 +0100 Subject: [PATCH] docs: add Windows BUILD_MONAI instructions to installation guide The installation guide only documents the POSIX inline form `BUILD_MONAI=1 pip install ...` for building the C++/CUDA extensions. That `VAR=value command` syntax is not supported by Windows cmd.exe or PowerShell, so the documented commands fail out of the box for Windows users. Add cmd.exe and PowerShell snippets to both the system-wide (Option 1) and editable (Option 2) install sections: set the environment variable first, then run the install command. Closes #6119 Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com> --- docs/source/installation.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/docs/source/installation.md b/docs/source/installation.md index 5123bc3e6b..bbb04b2706 100644 --- a/docs/source/installation.md +++ b/docs/source/installation.md @@ -117,6 +117,22 @@ To build the extensions, if the system environment already has a version of Pyto BUILD_MONAI=1 pip install --no-build-isolation git+https://github.com/Project-MONAI/MONAI ``` +On Windows the inline `BUILD_MONAI=1 pip install ...` form is not supported by +`cmd.exe` or PowerShell. Set the environment variable first, then run either +install command shown above: + +```bat +:: cmd.exe +set BUILD_MONAI=1 +pip install --no-build-isolation git+https://github.com/Project-MONAI/MONAI +``` + +```powershell +# PowerShell +$env:BUILD_MONAI="1" +pip install --no-build-isolation git+https://github.com/Project-MONAI/MONAI +``` + this command will download and install the current `dev` branch of [MONAI from GitHub](https://github.com/Project-MONAI/MONAI). @@ -147,6 +163,22 @@ BUILD_MONAI=1 pip install -e . BUILD_MONAI=1 CC=clang CXX=clang++ pip install -e . ``` +On Windows set the environment variable before running `pip install -e .`: + +```bat +:: cmd.exe +cd MONAI/ +set BUILD_MONAI=1 +pip install -e . +``` + +```powershell +# PowerShell +cd MONAI/ +$env:BUILD_MONAI="1" +pip install -e . +``` + To uninstall the package please run: ```bash