If there is file, simple_example.py, which may be seen at
https://python-gtk-3-tutorial.readthedocs.io/en/latest/introduction.html
then the command "python simple_example.py" and also the command virt-manager
produce the error message.
" import gi
ModuleNotFoundError: No module named 'gi'"
On the other hand, "python2.7 simple_command.py" executes as expected.
This seems to be a bug in how python3 is installed on my machine which runs
straight PureOS based upon the green repository, with the LXQt desktop.
The packages python-gi and python3-gi are both installed.
F/U: The problem disappeared with a fresh install. I may have at one time installed a version of python-3.7.3 which apt install --reinstall did not replace. That version responded "python-3.7.3" to python3 --version, whereas the PureOS version responds
"python-3.7.3rc1".