Skip to content

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

@autumnjolitz

Description

@autumnjolitz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions