while trying just to import
from PySide import QtGui
I'm getting the following error:
ImportError: libpyside-python2.7.so.1.2: cannot open shared object file: No such file or directory
ls /usr/local/lib/python2.7/dist-packages/PySide/libpyside-python2.7.so.1.2
/usr/local/lib/python2.7/dist-packages/PySide/libpyside-python2.7.so.1.2
So the so file is in place, why PySide cannot find it? I've tried to install PySide via pip but got some kind of post-processing script error and installed package through synaptic.
Additional information:
ldd /usr/local/lib/python2.7/dist-packages/PySide/libpyside-python2.7.so.1.2
linux-vdso.so.1 => (0x00007ffffd34e000)
libpython2.7.so.1.0 => /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0 (0x00007fdd5a6ae000)
libshiboken-python2.7.so.1.2 => not found
libQtCore.so.4 => /usr/lib/x86_64-linux-gnu/libQtCore.so.4 (0x00007fdd5a1d6000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fdd59ed3000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fdd59cbd000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fdd598f4000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fdd596dd000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fdd594c0000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fdd592bb000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007fdd590b8000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fdd58db3000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fdd58ab6000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fdd588ae000)
/lib64/ld-linux-x86-64.so.2 (0x00007fdd5ae32000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fdd5866e000)
The output of ldd
suggests that libshiboken-python2.7.so.1.2
can't be found.
/usr/local/lib/python2.7/dist-packages/PySide
, where it is found, is not typically a directory where the dynamic linker would look for it.
There are several options in this case:
add the directory to the directories checked by the dynamic linker.
To do so, you can create a configuration file, e.g. /etc/ld.so.conf.d/pyside.conf
with the content:
/usr/local/lib/python2.7/dist-packages/PySide
then as root run ldconfig
copy or symlink the library to a directory that is already checked by the dynamic linker, like /usr/local/lib
(and run ldconfig
as root)
set LD_LIBRARY_PATH=/usr/local/lib/python2.7/dist-packages/PySide
(not reccomended)
If you have used pyside-setup to build from source, just run
sudo python pyside_postinstall.py -install
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With