packages/shared-skills/skills/data-scientist/references/uv-setup.md
This skill runs every data operation through uv run --with .... If uv --version fails, set uv up with the automated scripts or the manual commands below, then verify.
| Platform | Command |
|---|---|
| macOS / Linux / WSL / Git Bash | bash scripts/setup-uv.sh |
| Windows (PowerShell) | powershell -ExecutionPolicy Bypass -File scripts/setup-uv.ps1 |
Both scripts: detect OS + architecture → install uv to the latest release when missing → upgrade it when present (uv self update) → make it resolvable for the current shell → verify with uv --version. They are idempotent — safe to re-run any time.
curl -LsSf https://astral.sh/uv/install.sh | sh # official installer → ~/.local/bin/uv
# or, with Homebrew:
brew install uv
curl -LsSf https://astral.sh/uv/install.sh | sh # official installer → ~/.local/bin/uv
The installer detects glibc vs musl and downloads the right static binary. On minimal containers, ensure curl (or wget) exists; wget -qO- https://astral.sh/uv/install.sh | sh is the fallback.
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
# or, with winget:
winget install --id=astral-sh.uv -e
Use the Linux/macOS installer inside the Unix shell, not the PowerShell installer:
curl -LsSf https://astral.sh/uv/install.sh | sh
# GitHub Actions
- uses: astral-sh/setup-uv@v5
# or plain shell anywhere:
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
~/.local/bin (Unix) or %USERPROFILE%\.local\bin (Windows). New shells get it automatically on most setups; an already-open shell needs export PATH="$HOME/.local/bin:$PATH" (Unix) or $env:Path = "$env:USERPROFILE\.local\bin;$env:Path" (PowerShell) once.uv self update
uv self update only works for official-installer binaries; Homebrew/winget installs upgrade through their package manager (brew upgrade uv / winget upgrade astral-sh.uv). The setup scripts handle this automatically.
uv --version
Download the matching archive from the uv GitHub releases page, extract it, and put the uv binary anywhere on PATH. uv run --with <pkg> still needs network for first-time package resolution unless a mirror is configured via UV_INDEX_URL.