pip

Python's package installer, used to add third-party libraries from PyPI.

pip installs packages that aren't part of the standard library, downloading them from the Python Package Index (PyPI). The basic command is pip install <package>, and you can pin a version with pip install flask==3.0.0.

Always install into an active virtual environment so packages stay project-local, and record them in requirements.txt for reproducibility.

Example
pip install requests             # install a package from PyPI
pip install flask==3.0.0         # pin an exact version
pip freeze > requirements.txt    # record what is installed

Where this shows up in real Python

pip adds third-party libraries — requests, flask, pandas — that aren’t in the standard library.

Commonly used pip tools

  • pip install requests — install a package
  • pip install requests==2.31.0 — install a specific version
  • pip uninstall requests — remove it
  • pip list / pip freeze — see what’s installed
  • pip install -r requirements.txt — install from a list