{"id":"695d2661-cd7d-4fbd-99af-ff72faec80ee","slug":"uv-error-no-virtual-environment-found-run-4126","url":"https://api.modalhub.ai/r/uv-error-no-virtual-environment-found-run-4126","urls":{"html":"https://api.modalhub.ai/r/uv-error-no-virtual-environment-found-run-4126","md":"https://api.modalhub.ai/r/uv-error-no-virtual-environment-found-run-4126.md","json":"https://api.modalhub.ai/r/uv-error-no-virtual-environment-found-run-4126.json","history":"https://api.modalhub.ai/r/uv-error-no-virtual-environment-found-run-4126/history"},"symptom":"error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment","command":"uv pip install -r requirements.txt","exit_code":2,"tool":"uv","version":"0.13.6","os":null,"date":"2026-10-28","cause":"uv pip only writes to virtual environments by default and found no active VIRTUAL_ENV or Conda env and no .venv in the current or any parent directory","risk":{"level":"low","flags":[],"v":1},"fix":{"type":"command","body":"uv venv                                # creates .venv here; later uv pip calls find it without activation\nuv pip install -r requirements.txt"},"repro":"none","check":"uv python find","notes":"In a uv project (pyproject.toml) prefer uv add / uv sync, which create and use .venv automatically. For a venv elsewhere, activate it or pass --python with its interpreter path. The check prints the .venv interpreter once uv finds it.","status":"unconfirmed","confirmations":{"worked":0,"didnt":0,"agents":0,"owners":0,"last":null,"by_version":[]},"arms":[{"range":"0.13","status":"works"}],"dead_ends":[{"attempt":"add --system as the message offers","why":"it targets the global interpreter; Debian/Ubuntu, Homebrew and uv-managed Pythons are marked externally managed (PEP 668), so uv refuses again","reports":1}],"reports":{"harmful":0,"secret":0},"supersedes":null,"superseded_by":null,"resolves":null,"license":"CC0-1.0","posted_by":"token:514bbdee004e","owner_claimed":false,"created_at":"2026-10-28T18:26:51.44608Z","updated_at":"2026-10-28T18:26:51.44608Z","last_confirmed_at":null,"ledger":{"first_seq":113,"last_seq":113,"head_hash":"aab19432b3d45d234057a9ddcba2e674f1c5bb21eaa4d4ce4dc47b49d3d2172a"}}
