Orange Forum • View topic - Unable to construct Domains

Unable to construct Domains

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

Unable to construct Domains

Postby pulsoste » Fri Jun 29, 2012 2:30

Hi,
I'm new to Orange. I've installed Orange by following the instructions here -

"We have a repository with Orange packages for i386 and amd64 platforms. You should add the repository to your list of repositories by adding those two lines to /etc/apt/sources.list file:

deb http://orange.biolab.si/debian squeeze main
deb-src http://orange.biolab.si/debian squeeze main
After updating the list of known packages (aptitude update) you can install, for example, orange-canvas"

and sudo apt-cache install python-orange.

Then when I try to create a domain by doing the following, I get this error -


Python 2.7.3 (default, Apr 20 2012, 22:39:59)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Orange
>>> a, b, c = [Orange.feature.Discrete(x) for x in "abc"]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Discrete'

Please help .. I can't figure out what I'm doing wrong.

Re: Unable to construct Domains

Postby marko » Fri Jun 29, 2012 10:55

This is slightly embarrassing.

Your installation worked, but the Debian-packaged version has not been updated for quite a while (around a year, I think). In that year the interface has been almost completely rewritten. It has stayed backwards compatible but the code you are trying to use assumes that the a newer version of Orange is installed.

Please remove the installed package and try to install from source (see the download page for coarse instructions). You will need to install some additional dependencies though.

Best regards,
Marko


Return to Questions & Support



cron