Orange Forum • View topic - QtGui.so not found

QtGui.so not found

A place to ask questions about methods in Orange and how they are used and other general support.

QtGui.so not found

Postby vtn » Mon Jan 23, 2012 11:25

I tried to execute the code:

import sys
from PyQt4.QtGui import QApplication

appl = QApplication(sys.argv)

import Orange.data
import Orange.network
import OWNetExplorer

net = Orange.network.Network.read('musicians.net')
net.items = Orange.data.Table('musicians_items.tab')

ow = OWNetExplorer.OWNetExplorer()
ow.setGraph(net)

ow.show()
appl.exec_()

and get the following error:

Traceback (most recent call last):
File "/Workspaces/Python/PythonTests/src/orange_test.py", line 2, in <module>
from PyQt4.QtGui import QApplication
ImportError: dlopen(/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PyQt4/QtGui.so, 2): Library not loaded: @executable_path/../Resources/Qt4/lib/QtGui.framework/Versions/4/QtGui
Referenced from: /Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PyQt4/QtGui.so
Reason: image not found

I am using a python executable found in the Orange distribution (the only way I found I could access orange through script):

/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python-32

Any idea to what I should change @executable_path/../Resources/Qt4/lib/QtGui.framework/Versions/4/QtGui for it to work? Thanks

Re: QtGui.so not found

Postby Ales » Mon Jan 23, 2012 13:27

Try running python included in the bundle with the '/Applications/Orange.app/Contents/MacOS/python' script

Re: QtGui.so not found

Postby vtn » Mon Jan 23, 2012 16:46

Thanks, it works awesomely. I feel silly not to have tried that before!


Return to Questions & Support



cron