Skip to content

PIP

In one line

pip is Python's package installer, used to install and manage third-party packages from PyPI.

In simple words

pip (Pip Installs Packages) is Python's standard package manager. It installs packages from PyPI (Python Package Index), a repository of thousands of third-party libraries.

Common commands:

  • pip install package_name — install a package
  • pip install package_name==1.2.3 — install a specific version
  • pip uninstall package_name — remove a package
  • pip list — show installed packages
  • pip freeze > requirements.txt — save dependencies to a file
  • pip install -r requirements.txt — install from a file

Always use pip inside a virtual environment to avoid polluting the system Python. Modern Python (3.4+) includes pip automatically.

Example

bash
# Install a package
pip install requests

# Install a specific version
pip install django==4.2

# Save dependencies
pip freeze > requirements.txt

# Install from requirements
pip install -r requirements.txt

# List installed packages
pip list

pip installs, removes, and lists Python packages from PyPI. Use requirements.txt to track dependencies.

Common confusions

  • Confused with: npm

    The difference: pip is the package manager for Python (installs from PyPI). npm is the package manager for JavaScript/Node.js (inst#installs from npm registry). They serve the same purpose for different ecosystems.

Related terms

Related Resources

Related Lessons

Decode error messages

Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.

View errors

← Back to glossary