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
Also Mentioned In
- Why uv makes Make less essential for Python projects
- Conda
- Conda Package
- How to configure Claude Code to use uv
- How to configure Cursor rules to use uv
- How to Fix ModuleNotFoundError: No module named 'numpy' During pip Install
- How to require a virtualenv when installing packages with pip?
- How to use pip in a uv virtual environment
- pipenv
- pipfile
- pipx
- Publishing Your First Python Package to PyPI
- requirements.txt
- Twine
- Understanding the Conda/Anaconda Ecosystem
- virtualenv
- What is a build backend?
- What is a build frontend?
- What is a Python package?
- What is PEP 503?
- What is PEP 751?
- Why are there so many Python packaging tools?
- Why should I choose Conda?
Last updated on