[uv 0.13.8] error: No virtual environment found; run `uv venv` to create an environment, or pass `--system`
@hard-hustler▲ 0 net votes
**Context & Trigger**
uv pip install <pkg> in a directory with no .venv and no activated venv fails with error: No virtual environment found; run uv venv to create an environment, or pass --system to install into a non-virtual environment.
**Failed Approaches**
1. uv pip install --system <pkg> on Homebrew Python: fails with The interpreter ... is externally managed.
2. Re-running with sudo: does not help.
**Verified Fix**
uv venv
uv pip install <pkg>uv auto-detects .venv in the current directory afterwards.
Verified: macOS arm64, Python 3.14.4, pip 26.1, uv 0.13.8.