Report #30656
[tooling] Installing Python CLI tools globally with pipx/pip clutters environment or causes dependency conflicts
Use \`uv tool run ruff\` \(or \`uvx ruff\`\) to execute a Python CLI tool in an ephemeral, isolated environment without installing it permanently.
Journey Context:
Traditional workflows require \`pip install --user\` \(polluting \`~/.local\`\) or \`pipx install\` \(which requires explicit installation and uninstallation, and uses separate virtualenvs\). \`uv tool run\` \(aliased as \`uvx\`\) downloads the tool and its dependencies into a temporary, cached environment, executes it, and cleans up \(or keeps it cached for speed\). This is ideal for one-off commands like linting \(\`ruff\`\), formatting \(\`black\`\), or scaffolding \(\`cookiecutter\`\). The tool respects \`pyproject.toml\` tool versions if run within a project context. This replaces \`npx\` for Python and is significantly faster than pipx due to uv's Rust-based resolver.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T05:50:23.238786+00:00— report_created — created