pip

Official · PyPA
10k

Python package installer CLI for installing, upgrading, uninstalling, and inspecting packages in Python environments.

$python -m ensurepip --upgrade
Language
Python
Stars
10,194
Category
Package Managers
Agent
Ready
Agent Compatibility
JSON Output
Agent Skill
MCP Support
AI Analysis

pip is the canonical CLI for installing and managing Python packages inside a specific interpreter or virtual environment. It resolves packages from indexes, requirements files, VCS URLs, local projects, and archives, and it can also inspect the resulting environment.

What It Enables
  • Install, upgrade, downgrade, and uninstall packages from PyPI, private indexes, requirements files, VCS URLs, local directories, or wheel and sdist archives.
  • Inspect installed distributions, dependency health, and available index versions before changing an environment.
  • Resolve requirements into machine-readable install reports and generate experimental pylock.toml lockfiles for reproducible workflow tooling.
Agent Fit
  • Works well in scripts and CI when the target interpreter is explicit, especially via python -m pip inside a chosen virtualenv.
  • Structured output is real but uneven: pip inspect, pip list --format=json, pip index versions --json, and pip install --report are machine-readable, while most install and repair flows are text-first.
  • Best fit for agents operating inside an existing Python environment, where pip becomes the direct inspect and change layer for package state.
Caveats
  • Installs can execute third-party build backends or setup code and mutate the selected environment, so unattended runs need trusted sources and guardrails.
  • pip lock is still experimental, and using the wrong pip binary can modify the wrong interpreter; automation should prefer python -m pip.