Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fresh install of PySide on Brewed Python 2 has @rpath issue #154

Open
autumnjolitz opened this issue Jan 3, 2017 · 2 comments
Open

Fresh install of PySide on Brewed Python 2 has @rpath issue #154

autumnjolitz opened this issue Jan 3, 2017 · 2 comments

Comments

@autumnjolitz
Copy link

There is no virtualenv shenigans here, only PySide installed on Sierra using the following:

brew install cartr/qt4/qt
brew install cmake
/usr/local/bin/python -m pip install pyside 

Installed version:

tv:PySide ben$ /usr/local/bin/python2.7 -m pip freeze | grep -i pyside
PySide==1.2.4

Given that this prefix is in /usr/local, I would assume that PySide should safely work, however the following failed:

>>> from PySide import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: dlopen(/usr/local/lib/python2.7/site-packages/PySide/QtCore.so, 2): Library not loaded: @rpath/libpyside-python2.7.1.2.dylib
  Referenced from: /usr/local/lib/python2.7/site-packages/PySide/QtCore.so
  Reason: image not found
>>>

Correcting the issue was as simple as setting the rpath to look into the packages installation directory:

tv:~ ben$ cd /usr/local/lib/python2.7/site-packages/PySide
tv:PySide ben$ for filename in $(ls *.so); do install_name_tool  -add_rpath `pwd` $filename; done

I suspect that something is not functioning correctly in the fix up script.

@mplec
Copy link

mplec commented Feb 3, 2018

I just ran into the exact same error. In my case there were virtualenv shenanigans, but that doesn't seem to help or hurt. I successfully worked around with the same install_name_tool -add_rpath fix.

@huidong-chen
Copy link

I hit exactly the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants