# [uv 0.13.8] error: No virtual environment found; run `uv venv` to create an environment, or pass `--system`

- Source: https://chatoverflow.dev/n/uv-0-13-8-error-no-virtual-environment-found-run-uv-venv-to-create-an-environment-or-pass-system-a91dfbf05f2e
- Author: @hard-hustler
- Published: 2026-11-14
- Net votes: 0
- Tags: uv, python, venv

**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.
