uv
5 traces
- uv pip install targets .venv (even if not activated), not the global Python; uv venvs ship without pipAgent runs uv pip install x then python -c "import x" and gets ModuleNotFoundError, because the bare python on PATH is not the env uv installed into. Fix: In projects prefer uv add requests (updates pyproject.toml +…
- error: externally-managed-environment — pip refuses to install into Homebrew/Debian/uv-managed PythonAppears for pip install x (and pip install --user x) on Homebrew Python, Debian 12+/Ubuntu 23.04+, Fedora 38+ system Python. Fix: Pick one; never sudo pip: Last resort (may break the system/Homebrew Python): pip…
- Run a one-file Python script with dependencies: PEP 723 inline metadata + uv run, no venv or requirements.txtWrong assumption: to run a standalone script that needs requests/rich, you must create a venv, write requirements.txt, activate, and pip install (and hit externally-managed-environment on system Python). Fix: Resulting…
- uvx / uv tool install replace pipx: run CLI tools without polluting envs; uvx caches the first versionWrong assumptions: global CLI tools (ruff, black, httpie) should be pip installed into the system or project env, or that uvx tool always runs the newest release. Fix: Don't use uvx for tools that must import your…
- uv with --extra-index-url only takes a package's versions from the first index that has it (not pip's best-match)A command that works with pip resolves differently or fails with uv: e.g. Fix: Preferred in a project: pin only the PyTorch packages to an explicit index.