Orange Forum • View topic - How to build/use orangeqt

How to build/use orangeqt

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

How to build/use orangeqt

Postby bricklemacho » Wed Feb 27, 2013 6:24

Building Orange from source, specifically orange-source-snapshot-hg-2013-02-20.zip Everything appears to build ok. That is I can start up orange-canvas and drag/drop widgets.

When I inspect the output window is show some widgets not loading because it can't find orangeqt. Looking at the command from setup.py help output I notice "build_pyqt_ext" not sure if this will build orangeqt but possibly worth a try:

python ./setup.py build_pyqt_ext

This begins to compile ant then fails. Best I can determine is that can't find QMetaType header. Suspect it is trying to build pyqt (and not orangeqt), since I already have install pyqt via Mac ports try something else.

A google search for orangeqt (or a forum search) eventually links to an "old" readme file suggesting to build form command line and then put orangeqt.so somewhere in the Python path. Changing into source/orangeqt, run make, no errors and file orangeqt.so generated. I copy orangeqt.so to where orange.so is located in my case /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Orange/

When I run orange I get "Fatal Python error: PyThreadState_Get: no current thread" and orange-canvas crashes. Removal of the orangeqt.so file return orange-cancas back to a stable state.

Any ideas to what I am doing wrong?

For information:
Platform: MacOSX (Mountain Lion)
Python: Version 2.7
Macports install of qt4_mac, pyqt4, and qwt

Re: How to build/use orangeqt

Postby Ales » Wed Feb 27, 2013 16:14

bricklemacho wrote:setup.py help output I notice "build_pyqt_ext" not sure if this will build orangeqt
Yes it does build orangeqt. See this thread http://orange.biolab.si/forum/viewtopic.php?f=4&t=1731 for some tips.

bricklemacho wrote:When I run orange I get "Fatal Python error: PyThreadState_Get: no current thread" and orange-canvas crashes. Removal of the orangeqt.so file return orange-cancas back to a stable state.
This happens when orangeqt.so is linked with the wrong python.

Re: How to build/use orangeqt

Postby bricklemacho » Wed Feb 27, 2013 19:50

Ales wrote:Yes it does build orangeqt. See this thread http://orange.biolab.si/forum/viewtopic.php?f=4&t=1731 for some tips.


Thanks, I will have a read of the thread.

Ales wrote:This happens when orangeqt.so is linked with the wrong python.


Umm... in the orangeqt source directory "python ./setup.py build" it fails but "make" succeeds but somehow linking to wrong python.

I will have a read of the thread and see if I can get it compiling.

Thanks.

Re: How to build/use orangeqt

Postby bricklemacho » Wed Feb 27, 2013 20:07

Problem solved. Not sure if it is a Macports issue but the setup.py script was using different inlcude directories. For now I created some symbolic links. Not sure if it the best fix, but seems to be working.

Thanks for your help.


Return to Questions & Support