Orange Forum • View topic - importing orngTree fails

importing orngTree fails

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

importing orngTree fails

Postby irfanm6d » Tue Aug 11, 2009 17:41

Hi,
I am able to import orange but not import orngTree. Anything different to be done to get this working?

Environment :
python - 2.6
os - ubuntu 9.04
orange - latest svn

Thanks,
Irfan

irfan@damascus:~/thirdparty/src/orangesvn$ python
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import orange
>>> import orngTree
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named orngTree
>>>

Postby marko » Tue Aug 11, 2009 18:39

Did you follow the instructions in http://www.ailab.si/svn/orange/trunk/or ... .linux.txt ?

In particular, did you create a orange.pth file? In any case, try running the following two commands again.

Code: Select all
sudo sh -c "echo '/usr/lib/python2.6/dist-packages/orange' > /usr/lib/python2.6/dist-packages/orange.pth"
sudo ln -s /usr/lib/python2.6/dist-packages/orange/liborange.so /usr/lib/liborange.so
[/code]

Postby Guest » Tue Aug 11, 2009 18:57

Thanks for the quick reply.

I did follow the instructions on the link @ http://www.ailab.si/svn/orange/trunk/or ... .linux.txt

Only "import orange" works. Rest all fail as described below.

Thanks,
Irfan

Code: Select all
irfan@damascus:~$ cat /usr/lib/python2.6/dist-packages/orange.pth
/usr/lib/python2.6/dist-packages/orange
irfan@damascus:/usr/lib/python2.6/dist-packages/orange$ ls -l /usr/lib/liborange.so
lrwxrwxrwx 1 root root 52 2009-08-11 12:38 /usr/lib/liborange.so -> /usr/lib/python2.6/dist-packages/orange/liborange.so


Code: Select all
irfan@damascus:/usr/lib/python2.6/dist-packages/orange$ python
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import orange
>>> import orngTree
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named orngTree
>>> import orngStat
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named orngStat
>>>

Postby Janez » Tue Aug 11, 2009 21:09

What do you get if you write this?

Code: Select all
import sys
print sys.path

Postby marko » Wed Aug 12, 2009 9:52

Does your /usr/lib/python2.6/dist-packages/orange path constain any .py files?

Postby Guest » Wed Aug 12, 2009 15:45

I rebuilt the orange modules by doing it a complete "make clean" and "make".

The problem is fixed after a full re-install.

Thanks.


Return to Questions & Support



cron