The standard library is broad, but it doesn't cover everything. When
you need something like requests for HTTP or boto3 for AWS, you
install it with pip. pip is Python's package installer, and it pulls
from PyPI, the public index where the Python community publishes
libraries.
The basic command names the package you want:
pip install requests
pip contacts PyPI, downloads requests and anything it depends on,
and puts them where your Python can import them. After that,
import requests works in your code.
Two commands tell you what's already there:
pip list
pip show requests
pip list prints every installed package and its version. pip show
gives details about one package, including its version and what it
depends on.
Most packages rely on other packages. requests alone pulls in a
handful of supporting libraries for URLs and certificates. pip
resolves that whole tree for you and installs everything needed, which
is the main reason you never copy library files by hand.
Where a package lands depends on whether a virtual environment is
active. Inside an active venv, pip install drops the package into
that venv. Outside one, it targets the system or user Python. The next
nodes tie pip together with venvs and a requirements file so installs
are both isolated and repeatable.
pip install name downloads a package and its dependencies from PyPI.pip list shows installed packages; pip show name details one.