Content · Programming · Python

Python Installation on Ubuntu and Debian: Step-by-Step Guide

Ubuntu and Debian often ship a system Python version chosen for that distribution release, which may not be Python. Keep the system interpreter intact. Learn the essential ideas and try a practical example.

2 views Published Oct 17, 2026 Updated Oct 18, 2026 Admin

Ubuntu and Debian often ship a system Python version chosen for that distribution release, which may not be Python. Keep the system interpreter intact.

Understanding the Concept


Start by checking python3 --version. This tells you what your distribution supplies; it is not a request to install a new runtime. For a user-owned Python, a version manager such as uv is one practical choice: install uv from its documented package or installer method, then run uv python install 3.15. uv distributes managed interpreters that are separate from the system Python. The python3.15 command may be placed in your user executable directory, which must be on PATH. Do not repoint /usr/bin/python3 or change operating-system-managed symlinks.

When and Why You Would Use This


If your organization already provides a supported Python package repository, follow its instructions instead. On restricted systems, confirm package and network policies with the administrator. The goal is a working project interpreter, not replacing what APT and system tools expect.

Ubuntu and Debian Installation Checklist


  1. Check the Linux distribution and architecture.
  2. Check the system Python version without modifying it.
  3. Install uv using its official documented installation method or an approved package manager.
  4. Run uv python install 3.15 to obtain a user-owned interpreter.
  5. Verify python3.15 --version; use uv python find 3.15 if the command is not on PATH.

For a machine administered by someone else, do not use elevated permissions to modify the system Python. Version management is especially valuable on Linux because operating-system utilities frequently depend on their packaged interpreter.

Practical Example


python3 --version
uv python install 3.15
python3.15 --version
command -v python3.15

Understanding the Example


Run these commands only after installing uv through a trusted documented method. The first line might report an older Python release; that does not prevent a separate 3.15 installation. The last line locates the versioned interpreter.

Try It Yourself


Record the distribution python3 version. Then confirm that your separately installed Python has its own executable path.

Common Beginner Mistakes


  • Assuming sudo apt install python3 installs Python on every Ubuntu/Debian release. Repository versions vary.
  • Replacing /usr/bin/python3 with a manually installed runtime. System tools may depend on the distribution version.
  • Forgetting to include your user binary directory in PATH. A working interpreter may exist even when the command is not found.

Key Takeaways


  • A distribution system Python and your project Python can safely coexist.
  • Use a supported way to install a separate 3.15 runtime if APT does not offer it.
  • Confirm both version and executable path before selecting the interpreter in an IDE.
Share this resourceSend this page to someone who may find it useful.