Installation on Ubuntu / Debian
Python 3 is usually preinstalled, but pip and venv are not. sudo apt install -y python3 python3-pip python3-venv adds them. The interpreter is /usr/bin/python3.
Do not touch the system Python
Many distribution tools rely on /usr/bin/python3. Never replace it or run sudo pip install against it; create a virtual environment instead: python3 -m venv .venv && source .venv/bin/activate.
Newer versions
Ubuntu ships a specific Python 3 per release. For a newer interpreter, add the deadsnakes PPA or install pyenv, leaving the system version intact.