Gnome15 / gnome15

Fork of the old gnome15: git://git.russo79.com/gnome15/gnome15.git
http://gnome15.org
GNU General Public License v3.0
39 stars 25 forks source link

Ubuntu 16.04: No module named BaseDirectory #15

Open Escaflow opened 7 years ago

Escaflow commented 7 years ago

Installing was "fine" but i don't get past this.

Install after the required packages i found somewhere: sudo -H pip install python-uinput keyring sudo apt install python-gst0.10* gstreamer1.0-alsa autoconf -i ./configure --enable-systemtray --enable-plugin-backlight --enable-plugin-voip --enable-plugin-voip-teamspeak3 --enable-volume --enable-plugin-mediaplayer

Then i used the "fix" to comment out /usr/local/bin/g15-config line 36-40 described in the Fedora Issue. Also tried out the linking in the Wiki but that don't work since the dirs are different, so i searched a bit on the drive and used: sudo ln -s /usr/local/lib/python2.7/dist-packages/g19/ /usr/lib/python2.7/dist-packages/ sudo ln -s /usr/local/lib/python2.7/dist-packages/gnome15/ /usr/lib/python2.7/dist-packages/

Sadly i am stuck now since i don't know python...

err for reference: Traceback (most recent call last): File "/usr/local/bin/g15-config", line 56, in import gnome15.g15config as g15config File "/usr/local/lib/python2.7/dist-packages/gnome15/g15config.py", line 18, in import gnome15.g15locale as g15locale File "/usr/local/lib/python2.7/dist-packages/gnome15/g15locale.py", line 32, in import g15globals File "/usr/local/lib/python2.7/dist-packages/gnome15/g15globals.py", line 18, in import xdg.BaseDirectory ImportError: No module named BaseDirectory

Phidica commented 7 years ago

Gnome15 was designed for Ubuntu and similar architectures, so it's to be expected that some of the recommendations for a Fedora install (somewhat of a different file system) aren't necessary. Commenting the g15-config file may not be necessary (it depends if the Gio build is bugged on Ubuntu as well as Fedora...probably it isn't), and those symlinks you've made probably aren't doing anything. It's fine, I don't think they'll cause a problem either

So the trick to Python error messages when you're trying to install a program that ought to work is to look at the last line of the tracebacks. What this error message is telling you is that when Python tried to import xdg.BaseDirectory, it couldn't find it. That means your system doesn't have the xdg package (or, much less likely, you do have xdg but it's an old version which doesn't provide the BaseDirectory module). Basically, it's a dependency you've missed

I don't use Ubuntu so I'm not sure of the correct way to get that dependency. Try sudo apt-get install xdg, and if that doesn't exist then try pip install xdg

Escaflow commented 7 years ago

Thanks for the Reply.

Commenting the g15-config file may not be necessary it was, got the same error like in the Fedora topic.

just did a quick dig: escaflow@HAL:~ $ pip search pyxdg pyxdg-open (0.2.1) - Opens URL or file in user preferred application (xdg-open replacement). pyxdg (0.25) - PyXDG contains implementations of freedesktop.org standards in python. INSTALLED: 0.25 (latest)

0.25 Was the latest i could find on python.org, and it seems its installed:

escaflow@HAL:~ $ find /usr/ -name 'BaseDirectory' /usr/lib/python2.7/dist-packages/xdg/BaseDirectory.py /usr/lib/python2.7/dist-packages/xdg/BaseDirectory.pyc /usr/lib/python3/dist-packages/xdg/BaseDirectory.py /usr/lib/python3/dist-packages/xdg/pycache/BaseDirectory.cpython-35.pyc

Next step would be trace the import of the class, my understanding was "first load in your own folder" so: escaflow@HAL:~ $ ll /usr/local/lib/python2.7/dist-packages/ total 76 drwxr-sr-x 2 root staff 4096 Jan 14 17:02 g19 drwxr-sr-x 4 root staff 4096 Jan 14 17:31 gnome15 drwxr-sr-x 5 root staff 4096 Jan 14 13:31 keyring drwxr-sr-x 2 root staff 4096 Jan 14 13:31 keyring-10.2.dist-info -rwxr-xr-x 1 root staff 22296 Jan 14 13:39 _libsuinput.so drwxr-sr-x 10 root staff 4096 Jan 14 13:31 pip drwxr-sr-x 2 root staff 4096 Jan 14 13:31 pip-9.0.1.dist-info drwxr-sr-x 2 root staff 4096 Jan 14 13:39 python_uinput-0.11.2.dist-info drwxr-sr-x 2 root staff 4096 Jan 14 13:30 secretstorage drwxr-sr-x 2 root staff 4096 Jan 14 13:30 SecretStorage-2.3.1.dist-info drwxr-sr-x 2 root staff 4096 Jan 14 13:39 uinput drwxr-sr-x 2 root staff 4096 Jan 14 13:33 xdg-1.0.3.dist-info -rw-r--r-- 1 root staff 2522 Jan 14 13:33 xdg.py -rw-r--r-- 1 root staff 1854 Jan 14 13:33 xdg.pyc

moved the xdg.py and xdg.pyc out of the way and now its loading.

Sadly I have no idea how it got there, prop put it somehow there, sorry for the inconvenience.