{"action":"created","issue":{"url":"https://api.github.com/repos/PySide/PySide/issues/129","labels_url":"https://api.github.com/repos/PySide/PySide/issues/129/labels{/name}","comments_url":"https://api.github.com/repos/PySide/PySide/issues/129/comments","events_url":"https://api.github.com/repos/PySide/PySide/issues/129/events","html_url":"https://github.com/PySide/PySide/issues/129","id":109492814,"number":129,"title":"PySide in relocatable virtualenv: Library not loaded: @rpath/libpyside-python2.7.1.2.dylib","user":{"login":"fredrikaverpil","id":994357,"avatar_url":"https://avatars.githubusercontent.com/u/994357?v=3","gravatar_id":"","url":"https://api.github.com/users/fredrikaverpil","html_url":"https://github.com/fredrikaverpil","followers_url":"https://api.github.com/users/fredrikaverpil/followers","following_url":"https://api.github.com/users/fredrikaverpil/following{/other_user}","gists_url":"https://api.github.com/users/fredrikaverpil/gists{/gist_id}","starred_url":"https://api.github.com/users/fredrikaverpil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredrikaverpil/subscriptions","organizations_url":"https://api.github.com/users/fredrikaverpil/orgs","repos_url":"https://api.github.com/users/fredrikaverpil/repos","events_url":"https://api.github.com/users/fredrikaverpil/events{/privacy}","received_events_url":"https://api.github.com/users/fredrikaverpil/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":39,"created_at":"2015-10-02T13:40:50Z","updated_at":"2015-11-23T11:04:15Z","closed_at":null,"body":"I'm pip installing PySide into a virtualenv:\r\n\r\n    sudo virtualenv --always-copy $VENV\r\n    source $VENV/bin/activate\r\n    sudo $VENV/bin/pip install pyside\r\n    sudo $VENV/bin/python $VENV/bin/pyside_postinstall.py -install\r\n    deactivate\r\n\r\nThe virtualenv works great and I can run my Python/PySide script without problems:\r\n\r\n    $VENV/bin/python $SCRIPT\r\n\r\n\r\nNow, I make my virtualenv relocatable: \r\n\r\n    virtualenv --relocatable $VENV\r\n\r\nI move it:\r\n\r\n    mv $VENV $VENV_RELOCATED\r\n\r\n...and again run my script:\r\n\r\n    source $VENV_RELOCATED/bin/activate\r\n    $VENV_RELOCATED/bin/python $SCRIPT\r\n\r\nThis time around, I'm getting an error:\r\n\r\n\tTraceback (most recent call last):\r\n\t  File \"script.py\", line 1, in <module>\r\n\t    from PySide import QtCore, QtGui, QtUiTools\r\n\tImportError: dlopen(/absolute/path/to/relocated_venv/lib/python2.7/site-packages/PySide/QtCore.so, 2): Library not loaded: @rpath/libpyside-python2.7.1.2.dylib\r\n\t  Referenced from: /absolute/path/to/relocated_venv/lib/python2.7/site-packages/PySide/QtCore.so\r\n\t  Reason: image not found\r\n\r\n\r\nThese are the contents of the script:\r\n\r\n    from PySide import QtCore, QtGui, QtUiTools\r\n\r\nPlease note: the absolute path printed twice in the error message is the $VENV_RELOCATED\r\n\r\nThis is all on OS X 10.11.0 with Python 2.7.10 and PySide 1.2.2.\r\n\r\nAny ideas on workaround so that the virtualenv could be moved around?"},"comment":{"url":"https://api.github.com/repos/PySide/PySide/issues/comments/158905468","html_url":"https://github.com/PySide/PySide/issues/129#issuecomment-158905468","issue_url":"https://api.github.com/repos/PySide/PySide/issues/129","id":158905468,"user":{"login":"zzeleznick","id":5779832,"avatar_url":"https://avatars.githubusercontent.com/u/5779832?v=3","gravatar_id":"","url":"https://api.github.com/users/zzeleznick","html_url":"https://github.com/zzeleznick","followers_url":"https://api.github.com/users/zzeleznick/followers","following_url":"https://api.github.com/users/zzeleznick/following{/other_user}","gists_url":"https://api.github.com/users/zzeleznick/gists{/gist_id}","starred_url":"https://api.github.com/users/zzeleznick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zzeleznick/subscriptions","organizations_url":"https://api.github.com/users/zzeleznick/orgs","repos_url":"https://api.github.com/users/zzeleznick/repos","events_url":"https://api.github.com/users/zzeleznick/events{/privacy}","received_events_url":"https://api.github.com/users/zzeleznick/received_events","type":"User","site_admin":false},"created_at":"2015-11-23T11:04:15Z","updated_at":"2015-11-23T11:04:15Z","body":"@fredrikaverpil This solved my problem, but I was seeking to run my PySide program from my root python environment. I might need to create a virtualenv for this specific purpose, as it now defaults my bash to start python immediately each time I open a tab or window."}}