Skip to content

Prefer Nu's own uv to one on the PATH - #50

Merged
evangress merged 1 commit into
masterfrom
fix/prefer-bundled-uv
Nov 14, 2026
Merged

evangress merged 1 commit into
masterfrom
fix/prefer-bundled-uv

Conversation

@evangress

Copy link
Copy Markdown

Summary

Found while checking the MSI from master on Windows 11. The Environment tab's Nu's uv showed …\Python313\Scripts\uv.EXE: the installed app was using a uv that happened to be on the PC, not the one it ships with. find_uv() checked PATH before Nu's own uv wheel. Nu needs uv>=0.9.8 (adding a plugin uses uv pip install --excludes), so a learner with an older uv on their PATH would hit failures, starting with adding plugins.

  • New order: MU_UV (to choose another uv on purpose) → the uv package's binary, Nu's own dependency (in the installers and in a checkout's .venv) → uv on PATH, only if Nu has none of its own.
  • Tests updated: the new test_find_uv_prefers_its_own_uv_to_the_path, and the PATH fallback now applies only when there's no uv package.
  • Docs: docs/environment.md (which uv Nu uses, and MU_UV), docs/packaging.md, CHANGES.md, CLAUDE.md.

Note for development: in a checkout, Nu now uses the .venv's pinned uv (from uv.lock) rather than one on your PATH. Set MU_UV to use another.

Tested

  • Windows 11: full suite 1866 passed, 20 skipped; ruff and mkdocs build --strict clean.
  • From source, find_uv() now returns .venv\Scripts\uv.exe even though uv 0.11.26 is on PATH.

🤖 Generated with Claude Code

find_uv() checked the PATH before the uv wheel Nu depends on, so an
installed Nu used whatever uv a learner had installed (the Windows MSI
check found it using one from a Python's Scripts folder). Nu needs
uv>=0.9.8 (`uv pip install --excludes` for plugins), and an older uv on
the PATH would break adding plugins. Now: MU_UV -> the uv package's
binary -> the PATH, only if Nu has none of its own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@evangress
evangress merged commit cb0fe98 into master Nov 14, 2026
12 checks passed
@evangress
evangress deleted the fix/prefer-bundled-uv branch November 14, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant