Installing ubuntu-advantage-tools fails with Python module import not found
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| ubuntu-advantage-tools (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
Bug Description
Installing results in:
Preconfiguring packages ...
Selecting previously unselected package ubuntu-
(Reading database ... 694873 files and directories currently installed.)
Preparing to unpack .../ubuntu-
Unpacking ubuntu-
Setting up ubuntu-
Traceback (most recent call last):
File "<string>", line 2, in <module>
ModuleNotFoundE
Traceback (most recent call last):
File "/usr/lib/
from uaclient import defaults, messages
ImportError: cannot import name 'defaults' from 'uaclient' (/usr/local/
dpkg: error processing package ubuntu-
installed ubuntu-
Errors were encountered while processing:
ubuntu-
E: Sub-process /usr/bin/dpkg returned an error code (1)
> which python3
/usr/bin/python3
> python3 -c "import uaclient"
> sudo python3 -c "import uaclient"
> env PYTHONPATH=
> sudo env PYTHONPATH=
> ua version
Traceback (most recent call last):
File "/usr/bin/ua", line 33, in <module>
sys.
File "/usr/bin/ua", line 25, in importlib_
return next(matches)
File "/usr/lib/
module = import_
File "/usr/lib/
return _bootstrap.
File "<frozen importlib.
File "<frozen importlib.
File "<frozen importlib.
ModuleNotFoundE
> apt policy ubuntu-
ubuntu-
Installed: 37.1ubuntu0~24.04
Candidate: 37.1ubuntu0~24.04
Version table:
*** 37.1ubuntu0~24.04 500
500 http://
500 http://
100 /var/lib/
31.2.3 500
500 http://
500 http://
500 http://
500 http://
ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: ubuntu-
ProcVersionSign
Uname: Linux 6.11.0-28-generic x86_64
NonfreeKernelMo
ApportVersion: 2.30.0-0ubuntu4.4
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: KDE
Date: Wed Jan 7 12:18:24 2026
InstallationDate: Installed on 2024-12-13 (390 days ago)
InstallationMedia: Ubuntu 22.04.5 LTS "Jammy Jellyfish" - Release amd64 (20240911)
PackageArchitec
SourcePackage: ubuntu-
UpgradeStatus: Upgraded to noble on 2024-12-16 (387 days ago)

There is no Python3-uaclient
> sudo apt install --reinstall python3-opcua
...
Reinstallation of python3-opcua is not possible, it cannot be downloaded.
...
> pip install opcua opcua-client managed- environment
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.
...