I'm trying to import PySide / Qt into Python like so and get the follow error:
from PySide import QtCore
ImportError: dlopen(/usr/local/lib/python2.7/site-packages/PySide/QtCore.so, 2): Library not loaded: libpyside-python18.104.22.168.dylib
Referenced from: /usr/local/lib/python2.7/site-packages/PySide/QtCore.so
Reason: image not found
otool -L QtCore.so
libpyside-python22.214.171.124.dylib (compatibility version 1.2.0, current version 1.2.2)
libshiboken-python126.96.36.199.dylib (compatibility version 1.2.0, current version 1.2.2)
/usr/local/lib/QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
Well, the installer is somewhat broken, because the output from oTool should report a full path to the library (the path should be changed by the Pyside installer using install_name_tool).
Instead of going mad understanding what part of the installer is broken, I suggest you define:
LD_LIBRARY_PATH=/your/path/to/pyside/libraries export LD_LIBRARY_PATH
This will force the executable loader to scan for libraries into the path you supply too, even it's not configured by the linker.