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
I had a similar issue, and I resolved it by manually using otool -L
(as seen in the question) and install_name_tool
to update the paths.
install_name_tool -change @rpath/libshiboken.cpython-34m.1.2.dylib /usr/local/lib/python3.4/site-packages/PySide/libshiboken.cpython-34m.1.2.dylib /usr/local/lib/python3.4/site-packages/PySide/QtCore.so
install_name_tool -change @rpath/libpyside.cpython-34m.1.2.dylib /usr/local/lib/python3.4/site-packages/PySide/libpyside.cpython-34m.1.2.dylib /usr/local/lib/python3.4/site-packages/PySide/QtCore.so
I had to do this for several files in the PySide directory before the script would run.
This blog post is a nice reference: http://thecourtsofchaos.com/2013/09/16/how-to-copy-and-relink-binaries-on-osx/