You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bump version to 1.5.2 and update dependencies (#2451)
- Bump package version to 1.5.2
- Update minimum sleap-io version to 0.5.7
- Update minimum sleap-nn version to 0.0.4
- Add --python 3.13 flag to uv tool install commands to prevent Python 3.14 issues
- Consolidate repetitive installation documentation (reduce by 55 lines)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <[email protected]>
@@ -16,25 +16,26 @@ SLEAP can be installed as a Python package on Windows, Linux, and Mac OS. The ne
16
16
17
17
## Prerequisites
18
18
19
-
Python 3.11 (or) 3.12 (or) 3.13 (required for all installation methods)
19
+
### Python Version Requirements
20
+
Python 3.11, 3.12, or 3.13 is required for all installation methods.
20
21
21
22
!!! warning "Python 3.14 is not yet supported"
22
-
SLEAP currently supports **Python 3.11, 3.12, and 3.13**. **Python 3.14 is not yet tested or supported.** If you have Python 3.14 installed, you must specify the Python version in all `uv` install commands by adding `--python 3.13`.
23
-
For example:
24
-
```bash
25
-
# for uv tool install
26
-
uv tool install --python 3.13 "sleap[nn]" ...
23
+
SLEAP currently supports **Python 3.11, 3.12, and 3.13**. **Python 3.14 is not yet tested or supported.** If you have Python 3.14 installed, you must specify `--python 3.13` in your install commands.
27
24
28
-
# for uvx
29
-
uvx --python 3.13 ...
25
+
### Install uv (for uv-based methods)
30
26
31
-
# for uv add setup; specify version in uv init
32
-
uv init --python 3.13
27
+
If you plan to use `uv tool install`, `uvx`, `uv add`, or install from source, you'll need to install [`uv`](https://github.com/astral-sh/uv) first:
33
28
34
-
# for uv sync
35
-
uv sync --python 3.13 ...
36
-
```
37
-
Replace `...` with the rest of your install command as needed.
- For more information on which CUDA version to use for your system, see the [PyTorch installation](https://pytorch.org/get-started/locally/) guide. The `--index` in the install command should match the CUDA version you need (e.g., `https://download.pytorch.org/whl/cu118` for CUDA 11.8, `https://download.pytorch.org/whl/cu128` for CUDA 12.8, etc.).
- On macOS, MPS (Metal Performance Shaders) is automatically enabled for Apple Silicon acceleration.
101
88
102
89
=== "SLEAP GUI Only"
103
90
```bash
104
-
uv tool install "sleap"
91
+
uv tool install --python 3.13 "sleap"
105
92
```
106
-
!!! warning "GUI <u>ONLY</u>"
107
-
Installing this version of SLEAP will **NOT** include any training/inference capabilities, as it will not include the sleap-nn backend. This should primarily be used for **labeling**.
108
93
109
94
110
95
!!! tip "How uv tool install Works"
@@ -122,25 +107,13 @@ sleap-label --help
122
107
## Installation with uvx
123
108
`uvx` automatically installs sleap and runs your command inside a temporary virtual environment (venv). This means each run is fully isolated and leaves no trace on your system— perfect for trying out SLEAP without any **permanent** installation.
124
109
125
-
!!! note "Install uv"
126
-
Install [`uv`](https://docs.astral.sh/uv/)- an ultra-fast Python package manager:
- For more information on which CUDA version to use for your system, see the [PyTorch installation](https://pytorch.org/get-started/locally/) guide. The `--index` in the install command should match the CUDA version you need (e.g., `https://download.pytorch.org/whl/cu118` for CUDA 11.8, `https://download.pytorch.org/whl/cu128` for CUDA 12.8, etc.).
144
117
145
118
=== "Windows/Linux (CPU)"
146
119
```bash
@@ -151,15 +124,11 @@ sleap-label --help
151
124
```bash
152
125
uvx --from "sleap[nn]" sleap-label
153
126
```
154
-
!!! info "Mac MPS support"
155
-
- On macOS, MPS (Metal Performance Shaders) is automatically enabled for Apple Silicon acceleration.
156
127
157
128
=== "SLEAP GUI Only"
158
129
```bash
159
130
uvx --from "sleap" sleap-label
160
131
```
161
-
!!! warning "GUI <u>ONLY</u>"
162
-
Installing this version of SLEAP will **NOT** include any training/inference capabilities, as it will not include the sleap-nn backend. This should primarily be used for **labeling**.
163
132
164
133
!!! note "uvx Installation"
165
134
Because `uvx` installs packages fresh on every run, it's ideal for quick one-off tests. For regular use, you could install with [`uv tool install`](#installation-with-uv-tool-install) or setting up a development environment with [`uv sync`](#installation-from-source) to avoid repeated downloads.
@@ -170,19 +139,10 @@ sleap-label --help
170
139
171
140
This method creates a dedicated project environment using uv's modern Python project management. It initializes a new project with `uv init`, creates an isolated virtual environment with `uv venv`, and installs SLEAP using `uv add`. To use all installed packages, <u>**you must run commands with `uv run`**</u> (e.g., `uv run sleap-label ...` or `uv run pytest ...`).
172
141
173
-
!!! note "Install and set-up uv"
174
-
Step-1: Install [`uv`](https://github.com/astral-sh/uv) - an ultra-fast Python package manager:
142
+
!!! note "Set up your project environment"
143
+
Move to your project directory and initialize the virtual env:
- For more information on which CUDA version to use for your system, see the [PyTorch installation](https://pytorch.org/get-started/locally/) guide. The `--index` in the install command should match the CUDA version you need (e.g., `https://download.pytorch.org/whl/cu118` for CUDA 11.8, `https://download.pytorch.org/whl/cu128` for CUDA 12.8, etc.).
225
183
226
184
=== "Windows/Linux (CPU)"
227
185
```bash
@@ -232,15 +190,11 @@ This method creates a dedicated project environment using uv's modern Python pro
232
190
```bash
233
191
uv add "sleap[nn]"
234
192
```
235
-
!!! info "Mac MPS support"
236
-
- On macOS, MPS (Metal Performance Shaders) is automatically enabled for Apple Silicon acceleration.
237
193
238
194
=== "SLEAP GUI Only"
239
195
```bash
240
196
uv add "sleap"
241
197
```
242
-
!!! warning "GUI <u>ONLY</u>"
243
-
Installing this version of SLEAP will **NOT** include any training/inference capabilities, as it will not include the sleap-nn backend. This should primarily be used for **labeling**.
244
198
245
199
### Verify Installation
246
200
```bash
@@ -265,9 +219,6 @@ uv run sleap-label --help
265
219
266
220
We recommend creating a dedicated environment with [conda](https://docs.conda.io/en/latest/miniconda.html) or [mamba/miniforge](https://github.com/conda-forge/miniforge) before installing `sleap` with pip. This helps avoid dependency conflicts and keeps your Python setup clean. After installing Miniconda or Miniforge, create and activate an environment, then run the pip install commands below inside the activated environment.
267
221
268
-
!!! warning "Python 3.14 is not yet supported"
269
-
SLEAP currently supports **Python 3.11, 3.12, and 3.13**. **Python 3.14 is not yet tested or supported.**
- For more information on which CUDA version to use for your system, see the [PyTorch installation](https://pytorch.org/get-started/locally/) guide. The `--extra-index-url` in the install command should match the CUDA version you need (e.g., `https://download.pytorch.org/whl/cu118` for CUDA 11.8, `https://download.pytorch.org/whl/cu128` for CUDA 12.8, etc.).
286
235
287
236
=== "Windows/Linux (CPU)"
288
237
```bash
@@ -293,17 +242,12 @@ conda activate sleap
293
242
```bash
294
243
pip install "sleap[nn]"
295
244
```
296
-
!!! info "Mac MPS support"
297
-
- On macOS, MPS (Metal Performance Shaders) is automatically enabled for Apple Silicon acceleration.
298
245
299
246
=== "SLEAP GUI Only"
300
247
```bash
301
248
pip install sleap
302
249
```
303
250
304
-
!!! warning "GUI <u>ONLY</u>"
305
-
Installing this version of SLEAP will **NOT** include any training/inference capabilities, as it will not include the sleap-nn backend. This should primarily be used for **labeling**.
uv sync --extra dev --extra nn-cpu --index https://download.pytorch.org/whl/cpu --index https://pypi.org/simple
359
291
```
360
292
361
-
!!! info "Mac MPS support"
362
-
- On macOS, MPS (Metal Performance Shaders) is automatically enabled for Apple Silicon acceleration.
363
-
364
293
=== "GUI Only"
365
294
```bash
366
-
uv sync --extra dev
295
+
uv sync --extra dev
367
296
```
368
297
369
-
!!! warning "GUI <u>ONLY</u>"
370
-
Installing this version of SLEAP will **NOT** include any training/inference capabilities, as it will not include the sleap-nn backend. This should primarily be used for **labeling**.
371
-
372
298
!!! note "SLEAP `uv sync` Extras"
373
299
The `uv sync` comes with the following **extras** (for local builds):
374
300
@@ -402,6 +328,29 @@ uv run sleap-label
402
328
403
329
---
404
330
331
+
## Installation Notes
332
+
333
+
### CUDA Version Selection
334
+
335
+
For Windows/Linux systems with NVIDIA GPUs, the installation commands above use CUDA 12.8 by default. To use a different CUDA version:
336
+
337
+
-**CUDA 11.8**: Replace `cu128` with `cu118` in the index URL
338
+
-**CUDA 12.8**: Use `cu128` (default in examples above)
339
+
340
+
For more information on which CUDA version to use for your system, see the [PyTorch installation guide](https://pytorch.org/get-started/locally/).
341
+
342
+
### macOS GPU Support
343
+
344
+
On macOS, MPS (Metal Performance Shaders) is automatically enabled for Apple Silicon acceleration. No additional configuration is needed.
345
+
346
+
### GUI-Only Installation
347
+
348
+
Installing `sleap` (without the `[nn]` extra) will **NOT** include any training/inference capabilities, as it will not include the sleap-nn backend. This should primarily be used for **labeling only**.
349
+
350
+
To get full functionality including training and inference, install with `sleap[nn]`.
351
+
352
+
---
353
+
405
354
406
355
## Testing that things are working
407
356
@@ -424,15 +373,16 @@ To check that the GUI is working, simply type:
424
373
sleap-label
425
374
```
426
375
427
-
!!! note "Using `uv run`"
428
-
If you installed SLEAP using `uv pip install` or `uv sync`, you must prefix commands with `uv run` to ensure they run inside the correct virtual environment. For example, use:
376
+
377
+
You should see the SLEAP labeling interface pop up within a few moments.
378
+
379
+
!!! note "Using `uv run` with virtual environments"
380
+
If you installed SLEAP using `uv add` or `uv sync`, you must prefix commands with `uv run` to ensure they run inside the correct virtual environment. For example:
429
381
```
430
382
uv run sleap-label
431
383
```
432
384
instead of just `sleap-label`.
433
385
434
-
You should see the SLEAP labeling interface pop up within a few moments.
435
-
436
386
437
387
### Importing
438
388
@@ -526,17 +476,12 @@ If you run into any problems, check out the [Github Discussions](https://github.
526
476
527
477
If you get any errors or the GUI fails to launch, try running the diagnostics to see what SLEAP is able to detect on your system:
528
478
529
-
!!! note "Using `uv run`"
530
-
If you installed SLEAP using `uv pip install` or `uv sync`, you must prefix commands with `uv run` to ensure they run inside the correct virtual environment. For example, use:
531
-
```
532
-
uv run sleap-diagnostic
533
-
```
534
-
instead of just `sleap-diagnostic`.
535
-
536
479
```bash
537
480
sleap-diagnostic
538
481
```
539
482
483
+
(Remember to use `uv run sleap-diagnostic` if you installed with `uv add` or `uv sync`.)
484
+
540
485
!!! hint "If you were not able to get SLEAP installed:"
0 commit comments