1

Whenever I click the icon to launch software and updates, the program starts and then stops. I even try to launch it from the command line and the same thing happens.

/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py:40: PyGIWarning: Gdk was imported without specifying a version first. Use gi.require_version('Gdk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import GObject, Gdk, Gtk, Gio, GLib
/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py:40: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import GObject, Gdk, Gtk, Gio, GLib

This behaviour is strange because the command exits without any errors (echo $?). What else could be causing it to fail like this?

enter image description here enter image description here

Strangely enough, if I launch it as root (gksu software-properties-gtk), it works fine.

0

The problem was that the version of python I had installed as a user did not include the the gtk libraries required for this program to run.

When I ran it as root, it was using the system's python installation, which had all those libraries already built in, so naturally it worked then.

This problem has been fixed in later versions of software-properties-gtk because the shebang line at the top of the program now says:

#!/usr/bin/python3 instead of #!/usr/bin/env python3.

The later causes it to use the users's own version of python3, while the former (and now the defacto) is using the system installed version of python3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.