Why is Python Preinstalled on Ubuntu?
- Does the operating system depend on Python?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
Looking at 20.04, the technical reason is that
ubuntu-minimal depends on
python3. It would be tough to run Ubuntu without
ubuntu-minimal as its description is
This package depends on all of the packages in the Ubuntu minimal system, that is a functional command-line system with the following capabilities:
- Detect hardware
- Connect to a network
- Install packages
- Perform basic diagnostics
It is also used to help ensure proper upgrades, so it is recommended that it not be removed.
While I expect most of the core Linux programs don't require python, I believe a lot of software that Ubuntu (Canonical) writes is done in python. Things like
Another common dependency is that there are python
apt libraries used by a number of packages. For example,
unattended-upgrades is written in python
apt-cache rdepends python | grep -v python | wc -l
Since Ubuntu 20.04 uses python3 for default, run:
apt-cache rdepends python3 | grep -v python | wc -l
This basically says "Count the number of packages that depend on Python, NOT counting python specific packages". On my system it's well over 1000 other packages - safe to say Ubuntu depends pretty heavily on Python.