Installing `docker` using `pip` is not the option on `Ubuntu 24.04`:
```
$ pip3 install docker
error: externally-managed-environment
× 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.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
```
Hence Ubuntu 24.04 must upgrade `python3-docker=5.0.3` to `python3-docker>=6.1.0` where the compatibility issue with `requests` and `urllib3` is fixed.
ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: python3-docker 5.0.3-1ubuntu1
ProcVersionSignature: User Name 6.8.0-1007.7-azure 6.8.1
Uname: Linux 6.8.0-1007-azure x86_64
ApportVersion: 2.28.1-0ubuntu3
Architecture: amd64
CasperMD5CheckResult: unknown
CloudBuildName: server
CloudSerial: 20240423
Date: Thu May 23 14:34:20 2024
PackageArchitecture: all
ProcEnviron:
LANG=C.UTF-8
PATH=(custom, no user)
SHELL=/bin/bash
TERM=xterm
XDG_RUNTIME_DIR=<set>
RebootRequiredPkgs: Error: path contained symlinks.
SourcePackage: python-docker
UpgradeStatus: No upgrade log present (probably fresh install)
`docker3- python= 5.0.3-1ubuntu1` is useless because of the issue described [here](https:/ /github. com/docker/ docker- py/issues/ 3113) and fixed in version [6.1.0](https:/ /github. com/docker/ docker- py/releases/ tag/6.1. 0) with PR [3116](https:/ /github. com/docker/ docker- py/pull/ 3116).
as `Ubuntu 24.04` have following versions of `python3-requests`, `python3-urllib3` and `python3-docker` packages:
``` urllib3/ noble,now 2.0.7-1 all [installed, automatic]
$ apt list --installed | grep python3-urllib3
python3-
$ apt list --installed | grep python3-requests requests/ noble,now 2.31.0+ dfsg-1ubuntu1 all [installed, automatic]
python3-
intel@gramine24 04:~/docker- 7.0.0$ apt list --installed | grep python3-docker docker/ noble,now 5.0.3-1ubuntu1 all [installed]
python3-
$ lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 24.04 LTS
Release: 24.04
Codename: noble
```
Installing `docker` using `pip` is not the option on `Ubuntu 24.04`: managed- environment
```
$ pip3 install docker
error: externally-
× 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, venv/bin/ python and path/to/ venv/bin/ pip. Make
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/
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.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break- system- packages.
hint: See PEP 668 for the detailed specification.
```
Hence Ubuntu 24.04 must upgrade `python3- docker= 5.0.3` to `python3- docker> =6.1.0` where the compatibility issue with `requests` and `urllib3` is fixed.
ProblemType: Bug ature: User Name 6.8.0-1007.7-azure 6.8.1 esult: unknown ture: all DIR=<set>
DistroRelease: Ubuntu 24.04
Package: python3-docker 5.0.3-1ubuntu1
ProcVersionSign
Uname: Linux 6.8.0-1007-azure x86_64
ApportVersion: 2.28.1-0ubuntu3
Architecture: amd64
CasperMD5CheckR
CloudBuildName: server
CloudSerial: 20240423
Date: Thu May 23 14:34:20 2024
PackageArchitec
ProcEnviron:
LANG=C.UTF-8
PATH=(custom, no user)
SHELL=/bin/bash
TERM=xterm
XDG_RUNTIME_
RebootRequiredPkgs: Error: path contained symlinks.
SourcePackage: python-docker
UpgradeStatus: No upgrade log present (probably fresh install)