Skip to content

Commit ed0635c

Browse files
talmoclaude
andauthored
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]>
1 parent ce504df commit ed0635c

File tree

3 files changed

+60
-115
lines changed

3 files changed

+60
-115
lines changed

docs/installation.md

Lines changed: 54 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,26 @@ SLEAP can be installed as a Python package on Windows, Linux, and Mac OS. The ne
1616

1717
## Prerequisites
1818

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.
2021

2122
!!! 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.
2724

28-
# for uvx
29-
uvx --python 3.13 ...
25+
### Install uv (for uv-based methods)
3026

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:
3328

34-
# for uv sync
35-
uv sync --python 3.13 ...
36-
```
37-
Replace `...` with the rest of your install command as needed.
29+
```bash
30+
# macOS/Linux
31+
curl -LsSf https://astral.sh/uv/install.sh | sh
32+
33+
# Windows
34+
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
35+
```
36+
37+
!!! note "Skip this step if using pip"
38+
If you're installing with pip in a conda environment, you don't need uv.
3839

3940

4041
## Installation methods
@@ -67,44 +68,28 @@ To install SLEAP, you'll need to enter commands in a terminal. Here's how to ope
6768

6869
`uv tool install` installs SLEAP globally as a system-wide CLI tool, making all SLEAP CLI commands available from anywhere in your terminal.
6970

70-
!!! note "Install uv"
71-
Install [`uv`](https://github.com/astral-sh/uv) - a fast Python package manager:
72-
```bash
73-
# macOS/Linux
74-
curl -LsSf https://astral.sh/uv/install.sh | sh
75-
76-
# Windows
77-
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
78-
```
79-
8071
### Platform-Specific Commands
8172

8273
=== "Windows/Linux (CUDA)"
8374
```bash
8475
# CUDA 12.8
85-
uv tool install "sleap[nn]" --index https://download.pytorch.org/whl/cu128 --index https://pypi.org/simple
76+
uv tool install --python 3.13 "sleap[nn]" --index https://download.pytorch.org/whl/cu128 --index https://pypi.org/simple
8677
```
87-
!!! info "Other CUDA versions"
88-
- 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.).
8978

9079
=== "Windows/Linux (CPU)"
9180
```bash
92-
uv tool install "sleap[nn]" --index https://download.pytorch.org/whl/cpu --index https://pypi.org/simple
81+
uv tool install --python 3.13 "sleap[nn]" --index https://download.pytorch.org/whl/cpu --index https://pypi.org/simple
9382
```
9483

9584
=== "macOS"
9685
```bash
97-
uv tool install "sleap[nn]"
86+
uv tool install --python 3.13 "sleap[nn]"
9887
```
99-
!!! info "Mac MPS support"
100-
- On macOS, MPS (Metal Performance Shaders) is automatically enabled for Apple Silicon acceleration.
10188

10289
=== "SLEAP GUI Only"
10390
```bash
104-
uv tool install "sleap"
91+
uv tool install --python 3.13 "sleap"
10592
```
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**.
10893

10994

11095
!!! tip "How uv tool install Works"
@@ -122,25 +107,13 @@ sleap-label --help
122107
## Installation with uvx
123108
`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.
124109

125-
!!! note "Install uv"
126-
Install [`uv`](https://docs.astral.sh/uv/)- an ultra-fast Python package manager:
127-
```bash
128-
# macOS/Linux
129-
curl -LsSf https://astral.sh/uv/install.sh | sh
130-
131-
# Windows
132-
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
133-
```
134-
135110
### Platform-Specific Commands
136111

137112
=== "Windows/Linux (CUDA)"
138113
```bash
139114
# CUDA 12.8
140115
uvx --from "sleap[nn]" --index https://download.pytorch.org/whl/cu128 --index https://pypi.org/simple sleap-label
141116
```
142-
!!! info "Other CUDA versions"
143-
- 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.).
144117

145118
=== "Windows/Linux (CPU)"
146119
```bash
@@ -151,15 +124,11 @@ sleap-label --help
151124
```bash
152125
uvx --from "sleap[nn]" sleap-label
153126
```
154-
!!! info "Mac MPS support"
155-
- On macOS, MPS (Metal Performance Shaders) is automatically enabled for Apple Silicon acceleration.
156127

157128
=== "SLEAP GUI Only"
158129
```bash
159130
uvx --from "sleap" sleap-label
160131
```
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**.
163132

164133
!!! note "uvx Installation"
165134
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
170139

171140
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 ...`).
172141

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:
175144
```bash
176-
# macOS/Linux
177-
curl -LsSf https://astral.sh/uv/install.sh | sh
178-
179-
# Windows
180-
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
181-
```
182-
183-
Step-2: Move to your project directory and initialize the virtual env.
184-
```bash
185-
uv init
145+
uv init
186146
uv venv
187147
```
188148

@@ -220,8 +180,6 @@ This method creates a dedicated project environment using uv's modern Python pro
220180
# CUDA 12.8
221181
uv add "sleap[nn]" --index https://download.pytorch.org/whl/cu128 --index https://pypi.org/simple
222182
```
223-
!!! info "Other CUDA versions"
224-
- 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.).
225183

226184
=== "Windows/Linux (CPU)"
227185
```bash
@@ -232,15 +190,11 @@ This method creates a dedicated project environment using uv's modern Python pro
232190
```bash
233191
uv add "sleap[nn]"
234192
```
235-
!!! info "Mac MPS support"
236-
- On macOS, MPS (Metal Performance Shaders) is automatically enabled for Apple Silicon acceleration.
237193

238194
=== "SLEAP GUI Only"
239195
```bash
240196
uv add "sleap"
241197
```
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**.
244198

245199
### Verify Installation
246200
```bash
@@ -265,9 +219,6 @@ uv run sleap-label --help
265219

266220
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.
267221

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.**
270-
271222
To create a conda environment, run:
272223
```bash
273224
conda create -n sleap python=3.13
@@ -281,8 +232,6 @@ conda activate sleap
281232
# CUDA 12.8
282233
pip install "sleap[nn]" --extra-index-url https://download.pytorch.org/whl/cu128 --index-url https://pypi.org/simple
283234
```
284-
!!! info "Other CUDA versions"
285-
- 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.).
286235

287236
=== "Windows/Linux (CPU)"
288237
```bash
@@ -293,17 +242,12 @@ conda activate sleap
293242
```bash
294243
pip install "sleap[nn]"
295244
```
296-
!!! info "Mac MPS support"
297-
- On macOS, MPS (Metal Performance Shaders) is automatically enabled for Apple Silicon acceleration.
298245

299246
=== "SLEAP GUI Only"
300247
```bash
301248
pip install sleap
302249
```
303250

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**.
306-
307251
### Verify Installation
308252
```bash
309253
sleap-label --help
@@ -325,19 +269,7 @@ git clone https://github.com/talmolab/sleap.git
325269
cd sleap
326270
```
327271

328-
**2. Install uv (skip if already installed)**
329-
330-
=== "macOS/Linux"
331-
```bash
332-
curl -LsSf https://astral.sh/uv/install.sh | sh
333-
```
334-
335-
=== "Windows"
336-
```bash
337-
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
338-
```
339-
340-
**3. Install Dependencies**
272+
**2. Install Dependencies**
341273

342274
=== "Windows/Linux (CUDA)"
343275
```bash
@@ -358,17 +290,11 @@ cd sleap
358290
uv sync --extra dev --extra nn-cpu --index https://download.pytorch.org/whl/cpu --index https://pypi.org/simple
359291
```
360292

361-
!!! info "Mac MPS support"
362-
- On macOS, MPS (Metal Performance Shaders) is automatically enabled for Apple Silicon acceleration.
363-
364293
=== "GUI Only"
365294
```bash
366-
uv sync --extra dev
295+
uv sync --extra dev
367296
```
368297

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-
372298
!!! note "SLEAP `uv sync` Extras"
373299
The `uv sync` comes with the following **extras** (for local builds):
374300

@@ -402,6 +328,29 @@ uv run sleap-label
402328

403329
---
404330

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+
405354

406355
## Testing that things are working
407356

@@ -424,15 +373,16 @@ To check that the GUI is working, simply type:
424373
sleap-label
425374
```
426375

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:
429381
```
430382
uv run sleap-label
431383
```
432384
instead of just `sleap-label`.
433385

434-
You should see the SLEAP labeling interface pop up within a few moments.
435-
436386

437387
### Importing
438388

@@ -526,17 +476,12 @@ If you run into any problems, check out the [Github Discussions](https://github.
526476

527477
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:
528478

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-
536479
```bash
537480
sleap-diagnostic
538481
```
539482

483+
(Remember to use `uv run sleap-diagnostic` if you installed with `uv add` or `uv sync`.)
484+
540485
!!! hint "If you were not able to get SLEAP installed:"
541486

542487
=== "Installed w/ uv:"

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ dependencies = [
5757
"albumentations",
5858
"requests",
5959
"matplotlib",
60-
"sleap-io[all]>=0.5.3",
60+
"sleap-io[all]>=0.5.7",
6161
]
6262

6363
[tool.setuptools.dynamic]
@@ -90,19 +90,19 @@ jupyter = [
9090
]
9191

9292
nn = [
93-
"sleap-nn[torch]>=0.0.2"
93+
"sleap-nn[torch]>=0.0.4"
9494
]
9595

9696
nn-cpu = [
97-
"sleap-nn[torch]>=0.0.2"
97+
"sleap-nn[torch]>=0.0.4"
9898
]
9999

100100
nn-cuda128 = [
101-
"sleap-nn[torch]>=0.0.2"
101+
"sleap-nn[torch]>=0.0.4"
102102
]
103103

104104
nn-cuda118 = [
105-
"sleap-nn[torch]>=0.0.2"
105+
"sleap-nn[torch]>=0.0.4"
106106
]
107107

108108
[project.urls]

sleap/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
Must be a semver string, "aN" should be appended for alpha releases.
1212
"""
1313

14-
__version__ = "1.5.1"
14+
__version__ = "1.5.2"
1515

1616

1717
def versions():

0 commit comments

Comments
 (0)