Repository navigation
fix(microsandbox): get uv with the image's Python, not the pip-less virtualenv - #647
Merged
Merged
Conversation
…irtualenv An install made before uvx was needed had uv and the backend's virtualenv in the volume but no uvx, so run.sh fetched uv again with python3, which PATH resolved to the virtualenv's (no pip): "No module named pip" at "Getting uv". uv.sh now asks the image's Python (sys._base_executable), whatever is first in PATH; test-uv.sh reproduces it with a pip-less venv. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JvRqz2gFGRwwZc4qAfj74Q
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.
Requested by Adeel · project thread
Description
Before: rerunning the install line on a Mac with the microsandbox backend stopped at "Getting uv" with
/data/.lens/venv/bin/python3: No module named pip.After: the sandbox gets uv and uvx with the image's own Python and carries on to the build.
Motivation and Context
#632 made run.sh fetch uv again when
uvxis missing. An install made before that has uv and the backend's virtualenv in the volume but no uvx, and run.sh puts$OPT/venv/binfirst in PATH, sopython3 -m pipran the virtualenv's Python, which uv created without pip. The newmicrosandbox/uv.shasks for the image's Python (sys._base_executable) whatever comes first in PATH, anduv sync --pythonuses the same one.Steps to reproduce (if appropriate):
sh microsandbox/test-uv.shmakes a pip-less venv, puts it first in PATH and leaves uv without uvx. With the oldpython3 -m pipit fails with exactly the error from the log ("No module named pip"); with the fix all three checks pass.Types of changes
Checklist:
make hookschecks it on commit). (shellcheck clean)microsandbox/test-uv.sh, in the Nxmicrosandboxtest target)changelog.d/microsandbox-uv-pip.md.Done questions (AGENTS.md)
Generated by Claude Code