pip

pip is the Python Package Authority’s (PyPA) standard package installer. It enables installing and managing Python packages from the Python Package Index (PyPI) and other package indexes. pip comes with modern Python installations and serves as the default tool for package operations in the Python ecosystem.

ℹ️
While pip remains Python’s default package installer, many workflows benefit from newer tools like uv that provide better performance and more integrated functionality.

Core Functionality

pip provides essential package management capabilities:

  • Installing packages from PyPI and other indexes
  • Uninstalling packages from environments
  • Managing requirements files
  • Installing packages in editable mode for development

Key Commands

Installing Packages

# Install latest version
pip install requests

# Install specific version
pip install requests==2.31.0

# Install from requirements file
pip install -r requirements.txt

# Install current directory in editable mode
pip install -e .

Managing Requirements

# Output installed packages
pip freeze > requirements.txt

# Install from requirements
pip install -r requirements.txt

Package Information

# List installed packages
pip list

# Show package details
pip show requests

# Check environment for conflicts
pip check

Limitations

pip has limitations to consider:

  • No built-in dependency locking
  • Limited caching optimization
  • Slower package operations than uv
  • No integrated virtual environment management

Learn More

Last updated on

Please submit corrections and feedback...