Skip to content

Commit d6713fd

Browse files
Shizoquaericspod
andauthored
docs: add Windows BUILD_MONAI install instructions (#8906)
Fixes #6119 . ### Description `docs/source/installation.md` only documents the POSIX inline form `BUILD_MONAI=1 pip install ...` for building the MONAI C++/CUDA extensions. This `VAR=value command` syntax is not supported by Windows `cmd.exe` or PowerShell, so the documented commands fail out of the box on Windows. This adds short cmd.exe and PowerShell snippets to both install flows (Option 1 system-wide and Option 2 editable): set the environment variable first, then run the existing `pip install` command. The `set BUILD_MONAI=1` form is the one confirmed working on Windows 11 in the issue thread. ### Types of changes - [x] Non-breaking change (documentation only). - [x] Documentation updated. ### How tested - Verified the new `bat`/`powershell` fenced blocks use valid Pygments lexers and lex without error tokens, so the strict docs build (`build_docs.yml`) emits no new warnings. - pre-commit markdown hooks (end-of-file, trailing-whitespace, mixed-line-ending) pass on the changed file. Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com> Co-authored-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com>
1 parent 0f5c5ec commit d6713fd

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

docs/source/installation.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,22 @@ To build the extensions, if the system environment already has a version of Pyto
117117
BUILD_MONAI=1 pip install --no-build-isolation git+https://github.com/Project-MONAI/MONAI
118118
```
119119

120+
On Windows the inline `BUILD_MONAI=1 pip install ...` form is not supported by
121+
`cmd.exe` or PowerShell. Set the environment variable first, then run either
122+
install command shown above:
123+
124+
```bat
125+
:: cmd.exe
126+
set BUILD_MONAI=1
127+
pip install --no-build-isolation git+https://github.com/Project-MONAI/MONAI
128+
```
129+
130+
```powershell
131+
# PowerShell
132+
$env:BUILD_MONAI="1"
133+
pip install --no-build-isolation git+https://github.com/Project-MONAI/MONAI
134+
```
135+
120136
this command will download and install the current `dev` branch of [MONAI from
121137
GitHub](https://github.com/Project-MONAI/MONAI).
122138

@@ -147,6 +163,22 @@ BUILD_MONAI=1 pip install -e .
147163
BUILD_MONAI=1 CC=clang CXX=clang++ pip install -e .
148164
```
149165

166+
On Windows set the environment variable before running `pip install -e .`:
167+
168+
```bat
169+
:: cmd.exe
170+
cd MONAI/
171+
set BUILD_MONAI=1
172+
pip install -e .
173+
```
174+
175+
```powershell
176+
# PowerShell
177+
cd MONAI/
178+
$env:BUILD_MONAI="1"
179+
pip install -e .
180+
```
181+
150182
To uninstall the package please run:
151183

152184
```bash

0 commit comments

Comments
 (0)