Let's think about it this way for a moment
Since Raspberry Pi OS is Debian-based, the apt package manager works exactly the way you learned it in the Linux tutorial — sudo apt update (refresh the package list), sudo apt install <package> (install), sudo apt remove <package> (uninstall). To install a Python library (aside from gpiozero) you can also use pip (the Python package manager) — it's worth knowing the difference between apt (system-wide packages) and pip (Python-specific packages).
Let's connect it to a real scenario
For a web server project, installing nginx is as simple as typing sudo apt install nginx (following the same pattern as the Linux tutorial's Docker/Web chapter). To install a Python library (say, requests or flask), run pip install requests flask — using a virtual environment (python3 -m venv) lets you isolate each project's dependencies and avoid conflicts.
Let's look at it together
# System package (apt)
sudo apt update
sudo apt install nginx
# Python package (pip)
pip install requests flask
# Virtual environment (recommended for projects)
python3 -m venv myproject-env
source myproject-env/bin/activate
pip install flaskAfter installing nginx, running sudo systemctl status nginx should show it as 'active (running)'.5-minute try-it
Create a Python virtual environment and try installing the flask library (on a Pi if you have one, or on the Linux tutorial's VM/WSL).
A quick word of caution
Just like the package management lesson in the Linux tutorial warned, running sudo apt upgrade on a production Pi (a home server that's running 24/7) without testing it first can shift dependency versions out from under you.