Unfortunately, it gets installed into the `site-packages` subdirectory of `/usr/lib/python3.10`, whereas Python is configured to only search the `dist-packages` subdir:
```
# python
Python 3.10.4 (main, Apr 2 2022, 09:04:19) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/lib/python310.zip', '/usr/lib/python3.10', '/usr/lib/python3.10/lib-dynload', '/usr/local/lib/python3.10/dist-packages', '/usr/lib/python3/dist-packages']
```
Solution proposal
-------------------
Ship a new release of the package with the module installed into `dist-packages` instead of `site-packages` under `/usr/lib/python3.10`.
Context
---------
```
# lsb_release -rd
Description: Ubuntu 22.04 LTS
Release: 22.04
```
Symptoms
----------
The `/usr/libexec/ sssd/sss_ analyze` tool, invoked through `sssctl analyze`, is broken under Ubuntu 22.04:
``` sssd/sss_ analyze" , line 3, in <module> rror: No module named 'sssd' sssd/sss_ analyze' failed with [1]
# sssctl analyze --help
Traceback (most recent call last):
File "/usr/libexec/
from sssd import sss_analyze
ModuleNotFoundE
Command '/usr/libexec/
```
Cause
-------
The tool is brought by the `sssd-tools` package, which also comes with the expected Python module named `sssd`:
``` sssd/sss_ analyze sssd/sss_ analyze s/sssd/ sssd-tools_ 2.6.3-1ubuntu3_ amd64.deb bfefb0a11488be6 be f774b907ef13aae c271f5db77 1fa77ecc5a68f3d dd682bf4408ad02 9bfc403367dc7dc 657b fbbfc6a553ea9db 72e76d9e5d1567d a83d9356db21ad4 62927e4a3c20773 f17a914115e89d1 e62c66b28d529c5 2642d7f9f58d8d8 12113e83 python3. 10/site- packages/ sssd python3. 10/site- packages/ sssd/__ init__. py python3. 10/site- packages/ sssd/modules python3. 10/site- packages/ sssd/modules/ __init_ _.py python3. 10/site- packages/ sssd/modules/ request. py python3. 10/site- packages/ sssd/parser. py python3. 10/site- packages/ sssd/source_ files.py python3. 10/site- packages/ sssd/source_ journald. py python3. 10/site- packages/ sssd/source_ reader. py python3. 10/site- packages/ sssd/sss_ analyze. py
# dpkg -S /usr/libexec/
sssd-tools: /usr/libexec/
# apt-cache show sssd-tools
Package: sssd-tools
Architecture: amd64
Version: 2.6.3-1ubuntu3
Priority: extra
Section: utils
Source: sssd
Origin: Ubuntu
...
Depends: python3, python3-sss, python3-systemd, sssd-common (= 2.6.3-1ubuntu3), libc6 (>= 2.34), libdhash1 (>= 0.4.0), libldb2 (>= 0.9.21), libpam0g (>= 0.99.7.1), libpopt0 (>= 1.14), libref-array1 (>= 0.4.0), libsss-certmap0 (>= 2.6.3), libtalloc2 (>= 2.0.4~git20101213)
...
Filename: pool/main/
Size: 92454
MD5sum: ed023079efa434d
SHA1: 28f44521c11ae93
SHA256: b4954b7ec32bbc2
SHA512: 693eaa32af1dd9f
...
# dpkg -L sssd-tools
...
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
...
```
Unfortunately, it gets installed into the `site-packages` subdirectory of `/usr/lib/ python3. 10`, whereas Python is configured to only search the `dist-packages` subdir:
``` python310. zip', '/usr/lib/ python3. 10', '/usr/lib/ python3. 10/lib- dynload' , '/usr/local/ lib/python3. 10/dist- packages' , '/usr/lib/ python3/ dist-packages' ]
# python
Python 3.10.4 (main, Apr 2 2022, 09:04:19) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/lib/
```
Solution proposal
-------------------
Ship a new release of the package with the module installed into `dist-packages` instead of `site-packages` under `/usr/lib/ python3. 10`.