Python throws "symbol... not defined" errors

I have spent several hours searching for understanding that works. Nothing to date. I’m running 42.1 with current updates. Python 2.7; I have installed it from Yast, not source. I also have Python 3.5 installed (from Yast). This problem appears in several python apps over the last few months. The latest was trying to set up youtube-dl-gui.

A very simple test may serve to show the general issue most clearly:

vsl:/home/rufus/_Install-Media/Utility/youtube-dl-gui-master # python
Python 2.7.12 (default, Jul 01 2016, 15:34:22) [GCC] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/__init__.py", line 45, in <module>
    from wx._core import *
  File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py", line 4, in <module>
    import _core_
ImportError: /usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/_core_.so: symbol _ZN30_WX_LIST_HELPER_wxMenuItemList14DeleteFunctionEP10wxMenuItem, version WXU_3.0 not defined in file libwx_gtk2u_core-suse.so.1 with link time reference
>>> 


For reference, here is the output from attempt to set up the app:

vsl:/home/rufus/_Install-Media/Utility/youtube-dl-gui-master # python setup.py install
/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/_core_.so: symbol _ZN30_WX_LIST_HELPER_wxMenuItemList14DeleteFunctionEP10wxMenuItem, version WXU_3.0 not defined in file libwx_gtk2u_core-suse.so.1 with link time reference


Please advise. (I would include zypper listings but the forum 'ware doesn’t like so many characters.)

Thanks

Rufus

Such “symbol lookup errors” are typical symptoms of mixing (incompatible) packages from different repos.

One of the main “usual suspects” for problems of this kind are wxWdigets/wxGTK packages, which seems to be the case here.


  File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py", line 4, in <module>
    import _core_
ImportError: /usr/lib64/python2.7/site-packages/**wx-3.0-gtk2**/wx/_core_.so: symbol _ZN30_WX_LIST_HELPER_wxMenuItemList14DeleteFunctionEP10wxMenuItem, version WXU_3.0 not defined in file **libwx_gtk2u_core-suse.so.1** with link time reference

So you should take a look where all of your “wxwidgets” or “wxgtk” packages are coming from, looks like the one providing the “libwx_gtk2u_core-suse.so.1” and the one providing the wx-3.0-gtk2 modules are not compatible, i.e. unicode build vs. non-unicode build, at least two different versions available atm. (2.8 vs. 3.0) and several other compile time options (which make wxGTK/wxWidget packages one of the “usual suspects” for such problems).

AK

P.S. You could use a pastebin service for longer outputs, IIRC there is one suggested in the forum’s faq.

Addendum:

Youtube-dl-gui from here?

https://github.com/MrS0m30n3/youtube-dl-gui

Works for me™ (on 42.1) with

python: 2.7.12

libwx_gtk2u_core-suse1: 3.0.2

and (that might be the important one)

python-wxWidgets: 2.8.12.1

AK

P.S. “Works” only means the program starts normal without any “symbol lookup error”, I did not check any of its functionality as I prefer to use youtube-dl via CLI.

@Akoellh

Thanks for your quick notes. Sorry for delayed reply - I thought I’d get email notifications on replies to thread. I’ll investigate the repositories this evening.

Rufus