A python3 application requires GTK3 to run, I can't install it

Hi! I am trying to launch an application pyglossary https://github.com/ilius/pyglossary
I cloned the repository, tried to run the app:

aleksandr@linux-b0ak:~/pyglossary> python3 main.py 
Module 'lxml' not found, skipping plugin 'appledict_bin'
Traceback (most recent call last):
  File "main.py", line 423, in <module>
    __import__("ui.ui_%s" % ui_type2),
  File "/home/aleksandr/pyglossary/ui/ui_gtk.py", line 42, in <module>
    gi.require_version("Gtk", "3.0")
  File "/usr/lib64/python3.6/site-packages/gi/__init__.py", line 130, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Gtk not available

Obviously, I need to have gtk3 installed, which I don’t have. I try using zypper to deal with it and I get:

aleksandr@linux-b0ak:~/pyglossary> sudo zypper in gtk3
[sudo] password for root: 
Sorry, try again.
[sudo] password for root: 
Loading repository data...
Reading installed packages...
'gtk3' not found in package names. Trying capabilities.
'libgtk-3-0' providing 'gtk3' is already installed.
Resolving package dependencies...

Nothing to do.

Hi
When you see the gi bit in the error, likely gobject items missing eg python3-gobject and gobject-introspection.

Hi
Try this one…
https://build.opensuse.org/package/show/home:malcolmlewis:TESTING/pyglossary

I have python3-gobject already installed. I tried installing gobject-introspection, it went fine. The error message is still the same.
I also tried your build:

aleksandr@linux-b0ak:~/pyglossary> pyglossary
Module 'lxml' not found, skipping plugin 'appledict_bin'
/usr/bin/pyglossary: line 1: 17358 Segmentation fault      (core dumped) /usr/share/pyglossary/main.py "$@"


Hi
Likely something lurking from your git install…

Tested on Tumbleweed and Leap 15.1;

https://thumbs2.imagebam.com/f5/6b/1b/729d241334171782.jpg](ImageBam)

If you uninstall the rpm, then go have a look for files lurking and manually remove;


/usr/bin/pyglossary
/usr/share/applications/pyglossary.desktop
/usr/share/pixmaps/pyglossary.png
/usr/share/pyglossary
/usr/lib/python3.6/site-packages/pyglossary/

rm -rf ~/.pyglossary

Then re-install the rpm and see how it goes.

I tried all the directories you mentioned. Not a trace, except ~/.pyglossary. I’ve deleted it. I’ve also reinstalled the program using zypper.
I still get the same error message.

Hi
Can you create a test user and login as this test user and try the command again.

Also are you running Xorg or Wayland?

I have x11. I’ve tried to create a new user and run pyglossary, got the same error message.

Hi
Can you post the full output from;


pyglossary -v 4

aleksandr@linux-b0ak:~> pyglossary -v 4
Module 'lxml' not found, skipping plugin 'appledict_bin'
Loading plugins from directory: '/usr/lib/python3.6/site-packages/pyglossary/plugins'
Module 'lxml' not found, skipping plugin 'appledict_bin'
Plugin disabled or not a plugin: babylon_bdc
Plugin disabled or not a plugin: formats_common
Plugin disabled or not a plugin: gettext_mo
Plugin disabled or not a plugin: paths
Plugin disabled or not a plugin: stardict_test
Plugin disabled or not a plugin: testformat
Loading plugins from directory: '/home/aleksandr/.pyglossary/plugins'
prefOptions = {'remove_html_all': False}
/usr/bin/pyglossary: line 1: 21256 Segmentation fault      (core dumped) /usr/share/pyglossary/main.py "$@"


Hi
Can you run the following and just post the last 10-20 lines?


strace /usr/share/pyglossary/main.py

futex(0x7f8b7d03a528, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f8b7d03a528, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f8b7d03a528, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f8b7d03a528, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f8b7d03a528, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f8b7d03a528, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f8b7d03a528, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f8b7d03a528, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f8b7d03a528, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f8b7d03a528, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f8b7d03a528, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f8b7d03a528, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f8b7d03a528, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f8b7d03a528, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f8b7d03a528, FUTEX_WAKE_PRIVATE, 2147483647) = 0
brk(0x5585ecf1b000)                     = 0x5585ecf1b000
futex(0x7f8b7d03a528, FUTEX_WAKE_PRIVATE, 2147483647) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=NULL} ---
+++ killed by SIGSEGV (core dumped) +++
Segmentation fault (core dumped)


Hi
Can you scroll back in the output to look for something other than stuff waiting to close. Or send the output to a file and upload to SUSE Paste

https://susepaste.org/35302979

Hi
Weird, something is missing somewhere…

I’ve done a couple of minor updates can you try the 3.1 build please.

Do you have another system you can try it on?

I’ve reinstalled the package from your repository. Now I get the following error:

aleksandr@linux-b0ak:~> pyglossary
/usr/bin/pyglossary: line 3:  5500 Segmentation fault      (core dumped) /usr/share/pyglossary/main.py "$@"

Unfortunately, I don’t have another machine to test.

Hi again.
I’ve set up a VirtualBox with the same OpenSUSE LEAP 15.1 installation on it.
I’ve only used the basic repos + codecs from pacman, I don’t think there might have been much interference from the messed up repos.
I have downloaded the original pyglossary project from GitHub, tried to run it in GTK, no luck.
I have also tried running your build again, now I get the error message:


alex@linux-1uyz:~> pyglossary
/usr/bin/pyglossary: line 3:  7114 Segmentation fault      (core dumped) /usr/share/pyglossary/main.py "$@"

Hi
All very strange, just updated to latest git release here on Leap 15.1 and all good… So are you running X11 or Wayland?

I am running X11

Hi
So updated the package again to the latest git release, if you remove the manually installed from git package and try my one, also remove the ~/.pyglossary as well…


zypper in https://download.opensuse.org/repositories/home:/malcolmlewis:/TESTING/openSUSE_Leap_15.1/noarch/pyglossary-3.2.1+git20200413.0f0dbed-lp151.1.1.noarch.rpm