WingIDE on Fedora 26 cant find libSDL-1.2.so.0


124
views
1
11 weeks ago by
fedora 26 workstation,
wingpro 6.0.7-1 (rev 47fe5b0dd72b)
using Fedora 26 python 3.6.2
wxPyton 4.0.0b2

'import wx' works fine

but
"import wx.dataview as dv"  causes an error:

File "/usr/lib64/python3.6/site-packages/wx/dataview.py", line 12, in <module>
  from ._dataview import *

builtins.ImportError: libSDL-1.2.so.0: cannot open shared object file: No such file or directory

so iin the terminal i did:

sudo yum import libSDL-1.2.so.0

Last metadata expiration check: 0:19:04 ago on Mon 25 Sep 2017 09:59:11 AM -03.
Package SDL-1.2.15-24.fc26.i686 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!

so it IS installed.

so where is wingIDE looking for it?
Community: Wing Python IDE
thanks so much  for the speedy reply

when in the terminal:

i did your steps and the last step:

>>> os.environ['LD_LIBRARY_PATH']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python3.6/os.py", line 669, in __getitem__
raise KeyError(key) from None
KeyError: 'LD_LIBRARY_PATH'

and:
>>> import wx.dataview as dv
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python3.6/site-packages/wx/dataview.py", line 12, in <module>
from ._dataview import *
ImportError: libSDL-1.2.so.0: cannot open shared object file: No such file or directory

so same results as when in WIngIDE

I should point out this is the Fedora 26 default 3.6.2, i havent built it myself


i assume that 'LD_LIBRARY_PATH is an environment variable. i searched, and the file exists in /usr/lib. i will try just making an environment variable
written 11 weeks ago by ravenboy  
Where is libSDL-1.2.so.0 located?  You could add that directory to the env LD_LIBRARY_PATH so wx can find it.  So add LD_LIBRARY_PATH=/path/to/the/lib to Environment in Wing's Project Properties.  However, this seems more like a general package installation issue that maybe should be solved rather than worked around with manual configuration.  On Linux if you have all the packages, then the environment should really be set up correctly.  But assuming you also installled Python and wx from official packages then I'm not sure where to look to solve that.

Stepping back a bit... if 'import wx' works, does it work to then access wx.dataview directly?  If so, I would just do that.  It's also conceivable this is a bug in the wx 4 beta, depending on what they do to load .so modules.
written 11 weeks ago by Wingware Support  
this is a brand new installation of fedora  26 in vmware running as virtual machine on a mac, not that i think that matters

my installation of fedora 26 doesnt HAVE a LD_LIBRARY_PATH environment variable. so now i am trying by adding to wings preferences
same code works (osx and windows)  on other platforms so i doubt its wxpython issue
written 11 weeks ago by ravenboy  
Are the working cases the same fedora and/or same exact wxpython version?  That may help narrow down whether it's a fedora package issue or problem in the wx beta.

And yes, there often is no LD_LIBRARY_PATH env by default but it's a way to tell the library loader where to look for libraries it's not finding.
written 11 weeks ago by Wingware Support  
ok. i am kinda new to unix, python and wings all at the same time. things went VERY sommothly on winows and OSx. and now i added tha path to the bash.rc file, and 
now i get 

and now i have e=the env var when checking it in terminal using your earlier instructions

and a new error:

 import wx.dataview as dv
File "/usr/lib64/python3.6/site-packages/wx/dataview.py", line 12, in <module>
from ._dataview import *

builtins.ImportError: libSDL-1.2.so.0: wrong ELF class: ELFCLASS32

that ending 32 scares me. this is a 64 bit intsall and I'd have to guess thats an ELFCLASS32 should be ELFCLASS64
written 11 weeks ago by ravenboy  

2 Answers


2
11 weeks ago by
Yes, you have 32-bit libSDL and 64-bit Python, which can't import that.  You need to install 64-bit libSDL instead.  My guess is once that's done then you don't need to modify LD_LIBRARY_PATH at all.
1
dnf install libSDL-1.2.so.0

installs 32 bit SDL 

dnf install SDL 
installs 64 bit SDL


go figure

its ALWAYS something.... working on wingIDE and usiong Python3 at least means i dont have to write my app three different ways for three OS
thanks so much for your speedy help --- now i am doing real work. launched my app it failed another way, but this tome due to OSx serial ports being different than linux ports as to how you open them. (using pyserial) and THIS i totally expected.....
written 11 weeks ago by ravenboy  
you were right, the envirnment var is set in the 64 bit version, 
written 11 weeks ago by ravenboy  
0
11 weeks ago by
Assuming it works outside of Wing, then the problem is that Wing is not using the right env.  One simple solution is to start Wing from the command line environment in which the imports do work.  That may help if Wing picks up the right Python to use.

Or try comparing the following inside Wing and outside:

import sys, os
sys.executable
sys.path
os.environ['LD_LIBRARY_PATH']

These can be set/modified using Python Executable, Python Path, and Environment in Wing's Project Properties.

On Linux it may also be that you have say 32-bit libSDL and Python is running 64-bit, though this seems less likely.
Please login to add an answer/comment or follow this question.

Similar posts:
Search »