VM setup: install uv and make it the Python convention - #31
Merged
Merged
Conversation
Ubuntu's system Python refuses pip installs (PEP 668), and the generated CLAUDE.md told Claude to force past it with --break-system-packages. Install uv/uvx from Astral's checksum-verified GitHub release (upgraded on re-run, left alone if managed elsewhere), point CLAUDE.md at per-project uv environments, and add uv to the health check.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds uv to
claude-code-vm-setup.sh, and makes it the Python convention in the generatedCLAUDE.md.Ubuntu 24.04's system Python refuses
pip install(PEP 668,externally-managed-environment). The generatedCLAUDE.mdtold Claude to force past that with--break-system-packages, which a live run hit straight away.install_uv(phase 2, after Rust) installsuvanduvxinto~/.local/binfrom Astral's GitHub release for the machine's arch (x86_64/aarch64). The download is checked against the release's published sha256 before installing, the same approach as the Go install./usr/local/bin) is left alone.CLAUDE.mdnow says to use per-project environments via uv (uv init+uv add, oruv venv+uv pip install, run withuv run), never to install into system Python, and to useuv tool install/uvxfor Python CLI tools. The "Package managers" line lists uv instead ofpip --break-system-packages.--user --break-system-packages, now commented as the one deliberate exception: the skill's helper scripts run under plainpython3.uv also covers what pipx would (
uv tool install,uvx), so pipx isn't added.Test plan
shellcheckcleaninstall_uvin a freshubuntu:24.04container:~/.local/bin→ upgraded to 0.12.19;/usr/local/bin→ "managed elsewhere", untouched.uv venv+uv pip install six+ import from the venv works