I’ve been exploring what different software is available for the Librem 5 and one I was pleased to see (especially considering the sensors are present) was the compass application at Leonardo G. Trombetta / compass · GitLab
I successfully installed using the instructions provided and used it a couple times the past few days before coming back today and finding it no longer opens.
Trying to open it with the terminal now yields this result:
purism@pureos:~$ compass
Traceback (most recent call last):
File "/usr/local/bin/compass", line 42, in <module>
from compass import main
File "/usr/local/share/compass/compass/main.py", line 24, in <module>
import xdg.BaseDirectory
ModuleNotFoundError: No module named 'xdg'
purism@pureos:~$
Clearly I’m missing something, but reinstalling and trying to open it again gives the same message. The phone is fully updated and all the other applications run reasonably well as far as I can see.
Does anyone have any ideas how to resolve this? I’d appreciate any suggestions on what might get it working again.
It appears to be after a Python module called “xdg”. Sorry, I don’t know what the incantation is to get that or whether it is even available at the distro version that you are at.
" xdg has been renamed to xdg-base-dirs due to an import collision with PyXDG. Therefore the xdg package is deprecated. Install xdg-base-dirs instead." From: xdg · PyPI
Thank you for the additional insight and information, I installed pip using sudo apt-get install python3-pip
which successfully installed then attempted to install the missing component using python3 -m pip install xdg-base-dirs
Unfortunately I still received an error, this time mentioning something to the effect of not being available for the distribution.
Ultimately however, it appears the command sudo apt-get install python3-xdg
did the trick and the compass application now opens and functions just as it did before.
Thank you to everyone who offered their knowledge and suggestions! I greatly appreciate the help as I navigate setting up my new device.