Python Availability on Linux

Starting with Ubuntu 24.04, CSE-IT Linux systems will only include the default Python packages required by the operating system and its components.

The Problem

Python has now become integrated into many Linux distributions. It is installed not because they may be useful to end-users, but because the operating system directly relies on it. This means that replacing any component could have a cascading effect that can severely impact the operating system. Python modules may be upgraded or replaced by the base OS maintainers, which can affect the functionality of programs created by end-users.

This is a global issue with Python in Linux environments. Within CSE-IT, an additional issue occurs where different instructors may require different and incompatible versions of Python modules for different classes. These requirements can change between semesters, or even during the semester. 

The Solution

The industry standard Best Practices for Python states that end-users should never use the Python distribution or modules that come with the operating system. 

Rather, users are advised to create a virtual environment for Python where they can control the versions of all the desired software. These environments are isolated from the operating system (and from other environments) allowing users to have multiple independent environments at once for different projects or classes. 

The configuration for these environments can also be shared and distributed so that other users can easily create an identical environment, regardless of which Linux distribution or version they are using. In fact, they need not be using Linux at all as this will work on Windows or MacOS. 

There are various methods to create and use virtual environments with Python. CSE-IT recommends using Conda, and a self-help guide is available. 

Going Forward

While CSE-IT recommends that users not rely on the system-provided Python installation, best-effort will be made (on a case-by-case basis) to add additional Python modules which are provided and supported directly by the Linux distribution. Users should be aware that these modules (and the underlying Python environment) could at any time stop being compatible with their needs. Should this happen, CSE-IT will not be able to address the issue. 
 

Share