Interview Prep/Linux/Packages, kernel and boot

A developer needs a newer Python than the distro offers, without breaking system tools. What do you do?

IntermediateScenarioPackages, kernel and boot
Answer

Situation read → Never replace the system Python.

What I'd do →

  1. RHEL 9: install AppStream versions side by side: dnf install python3.12.
  2. Ubuntu: deadsnakes PPA or uv python install 3.13.
  3. Use virtual environments per app (python3.12 -m venv /opt/app/venv).
  4. Or ship the app in a container.

Why → Tools like dnf and many system scripts depend on the platform Python; overwriting /usr/bin/python3 breaks them.

Interview tip → Mention PEP 668 "externally managed environment" errors on new distros and that they're intentional.

All Linux questions Roadmap: Linux

More on Packages, kernel and boot