Python · Stage 8 – Organizing Bigger Programs · Lesson 42 of 50

Packages and pip

Understand third-party packages and install one only from a trusted source.

python -m pip install package_name
Line-by-line explanation
  1. python -m pip runs pip with the chosen Python interpreter.
  2. install requests an installation.
  3. package_name is a placeholder to replace with a real reviewed package.

On systems using python3, use python3 -m pip. Check a package’s official documentation, maintainer, release history, and exact spelling before installation.