Open
Description
Breaking changes
Removal of Temporary Workaround for Pip Install on Python Default Environment for Ubuntu 24
- Reverting the PR
Target date
The rollout will start on 2025-05-05, and will take 3-4 days to propagate the image to all the environments
The motivation for the changes
From Python Version 3.12 , packages in the default environment are restricted from Modification.
More info: https://packaging.python.org/en/latest/specifications/externally-managed-environments/
Possible impact
Post implementation: Pip Install command will fail with Error Message: "Externally Managed"
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.12/README.venv for more information.
Platforms affected
- Azure DevOps
- GitHub Actions
Runner images affected
- Ubuntu 20.04
- Ubuntu 22.04
- Ubuntu 24.04
- macOS 12
- macOS 13
- macOS 13 Arm64
- macOS 14
- macOS 14 Arm64
- macOS 15
- macOS 15 Arm64
- Windows Server 2019
- Windows Server 2022
Mitigation ways
Users are requested to use actions/setup-python action or can create a virtual env.