Orange Forum • View topic - Visualize widgets not available

Visualize widgets not available

Report bugs (or imagined bugs).
(Archived/read-only, please use our ticketing system for reporting bugs and their discussion.)
Forum rules
Archived/read-only, please use our ticketing system for reporting bugs and their discussion.

Visualize widgets not available

Postby alas » Tue Feb 08, 2011 17:45

Hi,
I just installed orange today. I can only see 3 widgets in Visualize. Is there something wrong with my installation?
Thanks a lot in advance,
Ana

Re: Visualize widgets not available

Postby santi » Wed Feb 09, 2011 8:54

The same happens here, I have just installed from the latest SVN snapshot and almost all the widgets from previous versions have disappeared. Will it take long to get them back?

Re: Visualize widgets not available

Postby Ales » Wed Feb 09, 2011 10:51

Can you post the output of Canvas Output window (menu Options -> Show Output Window) after starting Orange Canvas.

Re: Visualize widgets not available

Postby santi » Wed Feb 09, 2011 11:52

It is a long list of widgets not loaded wit errors of the kind:
Code: Select all
OWSOM: No module named svm


So the problem happens when importing the module "svm"
Code: Select all
Orange/__init__.py in <module>()
     27 import classification.lookup
     28 import classification.bayes
---> 29 import classification.svm
     30 import classification.logreg
     31 import classification.knn

As a temporal workaround, commenting that line let the widgets load (except for those who really depend on SVM).

Here is the list of affected modules:
Code: Select all
The following widgets could not be imported and will not be available: OWSurveyPlot, OWC45Tree, OWLiftCurve, OWNetClustering, OWClassificationTreeGraph, OWClassificationTree, OWNetExplorer, OWTestLearners, OWITree, OWRandomForest, OWLogisticRegression, OWRegressionTree, OWKNN, OWLinProj, OWCN2RulesViewer, OWClassificationTreeViewer, OWConfusionMatrix, OWMosaicDisplay, OWPreprocess, OWMajority, OWInteractionGraph, OWNetworkFromDistances, OWScatterPlot, OWMDS, OWPolyviz, OWNetworkFile, OWExampleDistance, OWSieveMultigram, OWCalibrationPlot, OWSOM, OWContinuize, OWSieveDiagram, OWRadviz, OWParallelCoordinates, OWSVM, OWCN2, OWNomogram, OWSOMVisualizer, OWROC, OWAttributeDistance, OWKMeans, OWNaiveBayes, OWRegressionTreeViewer2D.
The following prototype widgets could not be imported and will not be available: OWEnsemble, OWPerformanceCurves, OWPythonScript, OWItemsetViz, OWModelEmbedder, OWInteractionGraphProto, OWRScript, OWMetaMiner

Re: Visualize widgets not available

Postby Ales » Wed Feb 09, 2011 12:40

I cant replicate the problem. Can you post the layout of the Orange/classification/svm/ directory
(it should contain a '__init__.py' and 'kernels.py' files).

Re: Visualize widgets not available

Postby santi » Wed Feb 09, 2011 16:32

The problem stems from these buggy lines of the new setup.py:
Code: Select all
#Only packages one level under the Orange dir are retrieved, and therefore not 'classification.svm'
pkg_re = re.compile("Orange/(.+?)/__init__.py")
packages = ["Orange"] + ["Orange." + pkg_re.findall(p)[0] for p in glob.glob("Orange/*/__init__.py")]

A possible fix:
Code: Select all
import fnmatch
matches = []
for root, dirnames, filenames in os.walk('Orange'): #Recursively find '__init__.py's
  for filename in fnmatch.filter(filenames, '__init__.py'):
      matches.append(os.path.join(root, filename))
packages = ["Orange"] + [pkg.rpartition('/__init__.py')[0].replace('/','.') for pkg in matches]

Re: Visualize widgets not available

Postby Ales » Wed Feb 09, 2011 17:02

Thanks :D. I have included your fix in the setup.py script

Re: Visualize widgets not available

Postby alas » Mon Feb 28, 2011 21:09

Hi, I've added the fix to the setup.py file, but still cannot see the other widgets.
Thanks a lot!
Ana

Re: Visualize widgets not available

Postby Ales » Mon Feb 28, 2011 22:38

Can you post the output of Canvas Output window (menu Options -> Show Output Window) after starting Orange Canvas.

Re: Visualize widgets not available

Postby alas » Tue Mar 01, 2011 0:20

There were problems importing the following widgets:
OWDiscretize: the sip module implements API v8.0 to v8.1 but the PyQt4.Qwt5.Qwt module requires API v5.0
OWCalibrationPlot: name 'QwtPlotCurve' is not defined
OWLiftCurve: name 'QwtPlotCurve' is not defined
OWROC: name 'QwtPlotCurve' is not defined
OWMDS: name 'QwtPlotCurve' is not defined
OWNetExplorer: name 'QwtPlotCurve' is not defined
OWNetworkFromDistances: name 'QwtPlotCurve' is not defined
OWCorrAnalysis: name 'QwtPlotCurve' is not defined
OWDistributions: name 'QwtPlotCurve' is not defined
OWLinProj: name 'QwtPlotCurve' is not defined
OWParallelCoordinates: name 'QwtPlotCurve' is not defined
OWPolyviz: name 'QwtPlotCurve' is not defined
OWRadviz: name 'QwtPlotCurve' is not defined
OWScatterPlot: name 'QwtPlotCurve' is not defined
OWSieveMultigram: name 'QwtPlotCurve' is not defined
OWSurveyPlot: name 'QwtPlotCurve' is not defined
The following widgets could not be imported and will not be available: OWLiftCurve, OWRadviz, OWCalibrationPlot, OWSurveyPlot, OWScatterPlot, OWParallelCoordinates, OWNetworkFromDistances, OWCorrAnalysis, OWNetExplorer, OWMDS, OWPolyviz, OWDistributions, OWSieveMultigram, OWROC, OWDiscretize, OWLinProj.

Re: Visualize widgets not available

Postby Ales » Tue Mar 01, 2011 10:13

This is a problem with your installation of PyQwt.
What OS and Python version are you using?

Re: Visualize widgets not available

Postby alas » Tue Mar 01, 2011 13:54

Windows XP, Python(x,y) 2.6.5.6...
Thanks a lot,
Ana

Re: Visualize widgets not available

Postby Ales » Wed Mar 02, 2011 12:05

Do you by any chance also have Python 2.5 and PyQwt for it installed. If so, can you try to temporarily rename the Pyhton25 directory (by default C:\Python25) to something else (e.g. C:\Python25-tmp) and then run orange canvas for Python 2.6.

Re: Visualize widgets not available

Postby alas » Wed Mar 02, 2011 14:06

No, I only have Python 2.6... is there a way to install PyQwt correctly?
Thanks again!

Re: Visualize widgets not available

Postby Ales » Wed Mar 02, 2011 15:06

Try this: uninstall PyQwt5 and PyQy from the ControlPanel / Add Remove Programs. Then check if the directory C:\Python26\Lib\site-packages\PyQt4 still exists. If so manually delete the directory.
Then download the orange with required libraries installer and run it.

Next

Return to Bugs



cron