wxPython on Fedora 31

Robin,

Long time, no problems :slight_smile:

Been running wxPython code on Win 10 and absolutely no problems. Recently I tried to set up wxPython on Fedora 31 and have run into (at least) an issue. Note: I currently have both Python 2.7 and 3.76 installed on the Fedora but expect that Python 2.X is abt to become deprecated.

When I run code, I get a:

ImportError: libjpeg.so.8: cannot open shared object file: No such file or directory

There are 3 lines flagged (verbally) in the error but 1 error seems to lead from:

import wx

Have tried a few suggestions (including installing libjepg-turbo) but can’t seem to get past this.

I respect that the wxPython error may be only a symptom and may have nothing to do with it directly, but thought you might have some suggestions how to resolve this?

Thx in advance…cheers…

Where did your wxPython come from?

I followed the instructions on the wxPython Downloads page
(https://www.wxpython.org/pages/downloads/)

Hi,

On my Fedora 30, I had installed this :
https://extras.wxpython.org/wxPython4/extras/linux/gtk3/fedora-28/wxPython-4.0.6-cp37-cp37m-linux_x86_64.whl
And all worked fine with wxPython…

Best regards,

https://extras.wxpython.org/wxPython4/extras/linux/gtk3/fedora-28/wxPython-4.0.6-cp37-cp37m-linux_x86_64.whl

sudo pip3 install wxPython-4.0.6-cp37-cp37m-linux_x86_64.whl

I recently built wxPython for Python 3 on Fedora 30. It seems to work well, but I did not yet test a lot.

Basically, I followed the instructions here: https://blog.wizardsoftheweb.pro/installing-wxpython-on-fedora/
I had to set a TMPDIR, as the default was too small.

These were the commands:

sudo dnf install -y {dpkg,freeglut,gstreamer{,1}-plugins-ba{se,d-free},gtk3,lib{jpeg,notify,SM,tiff},python{2,3},SDL}{,-devel} @development-tools
sudo dnf install webkitgtk4{,-jsc}{,-devel} webkitgtk4-plugin-process-gtk2

export TMPDIR=~/tmp
mkdir $TMPDIR
python3 -mpip install --user wxpython

Regards,
Dietmar

Here are the prerequisites before install (adapt them to Fedora) :

Linux

On Ubuntu the following development packages and their dependencies should be installed in order to build Phoenix. Other debian-like distros will probably also have these or similarly named packages available. Extrapolate other package names accordingly for other linux distributions or other unixes.

dpkg-dev
build-essential
python3.7-dev and libpython3.7-dev # use appropriate Python version here
freeglut3-dev
libgl1-mesa-dev
libglu1-mesa-dev
libgstreamer-plugins-base1.0-dev
libgtk-3-dev
libjpeg-dev
libnotify-dev
libpng-dev
libsdl2-dev
libsm-dev
libtiff-dev
libwebkit2gtk-4.0-dev
libxtst-dev

Thnx for the suggestion.

I tried both the one you mention as well as the amd64 version (my machine). Same results :frowning:

Have you tried to install the package :
libjpeg-turbo
?

UPDATE 3 (3/23/20):

Not sure if this will help, but here is the sequence of error msgs.:

Traceback (most recent call last):
  File "/home/stephr1/_System Software/FreqCntr_Sys_alt.pyw", line 40, in <module>
    import wx
  File "/home/stephr1/.local/lib/python3.7/site-packages/wx/__init__.py", line 17, in <module>
    from wx.core import *
  File "/home/stephr1/.local/lib/python3.7/site-packages/wx/core.py", line 12, in <module>
    from ._core import *
ImportError: libjpeg.so.8: cannot open shared object file: No such file or directory

UPDATE2 (3/22/20):

I found libjpeg.so.8 and libjpeg.so.8.1.2 in a file named:

libjpeg-turbo-soname8-lib32-1.5.3-42.x86_64.rpm

and installed them using:

rpm2cpio libjpeg-turbo-soname8-lib32-1.5.3-42.x86_64.rpm | sudo cpio -ivdm --directory=/

The 2 files are now in /usr/lib32

Then I set LD_LIBRARY_PATH using:

export LD_LIBRARY_PATH="/usb/lib32:$LD_LIBRARY_PATH"

and echo $LD_LIBRARY_PATH produced:

/usb/lib32:

When I brought up SublimeText 3 and attempted to run the program, same error still occurs.

Have I missed a step, or done something wrong here?

Thx and cheers…


An update(1)…just tried a find -name "libjpeg.*" in /usr and same results.


It’s been a few weeks but I verified that I did. Don’t know if this makes a difference…

The error references a file called libjpeg.so.8 I looked in the file listing for libjpeg-turbo and did not see that file listed. Did see the files:

libjpeg.so
libjpeg.so.62
libjpeg.so.62.3.0

Any significance?

Thx and Cheers…