Comment 3 for bug 1930121

Revision history for this message
Grant Orndorff (orndorffgrant) wrote : Re: package ubuntu-advantage-tools 27.0.2~18.04.1 failed to install/upgrade: installed ubuntu-advantage-tools package post-installation script subprocess returned error exit status 1

Hi I noticed something and thought to chime in.

It appears this may involve a non-standard python installation: Python 3.9 is not in the archives for Bionic of Focal AFAIK. And python3.9 is installed in /usr/local/bin which is not the normal installation location. It is the location that python is installed when building from source and running `make altinstall`.

I was able to reproduce this issue by building python3.9 from source on bionic and installing with `make altinstall`. By default it doesn't appear that /usr/lib/python3/dist-packages is added to the python path.

So the quick fix is hopefully to just set PYTHONPATH=/usr/lib/python3/dist-packages. To test, try running
PYTHONPATH=/usr/lib/python3/dist-packages python3
and then try to `import uaclient` in the python shell.

There may be a way for us to handle this situation in the ubuntu-advantage-tools package as well.