python import module question

S

syed khalid

I am trying to do a "import shogun" in my python script. I can invoke shogun with a command line with no problem. But I cannot with a python import statement.

Syedk@syedk-ThinkPad-T410:~/shogun-2.0.0/src/interfaces/cmdline_static$ shogun | more
libshogun (i686/v2.0.0_9c8012f_2012-09-04_09:08_164102447)

Copyright (C) 1999-2009 Fraunhofer Institute FIRST
Copyright (C) 1999-2011 Max Planck Society
Copyright (C) 2009-2011 Berlin Institute of Technology
Copyright (C) 2012 Soeren Sonnenburg, Sergey Lisitsyn, Heiko Strathmann
Written (W) 1999-2012 Soeren Sonnenburg, Gunnar Raetsch et al.

( configure options: "configure options --interfaces=python_static" compile flag
s: "-fPIC -g -Wall -Wno-unused-parameter -Wformat -Wformat-security -Wparenthese
s -Wshadow -Wno-deprecated -O9 -fexpensive-optimizations -frerun-cse-after-loop
-fcse-follow-jumps -finline-functions -fschedule-insns2 -fthread-jumps -fforce-a
ddr -fstrength-reduce -funroll-loops -march=native -mtune=native -pthread" link
flags: " -Xlinker --no-undefined" )
( seeding random number generator with 3656470784 (seed size 256))
determined range for x in log(1+exp(-x)) is:37 )
Python 2.7.3 (default, Apr 10 2013, 05:46:21)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.Traceback (most recent call last):



Regards
 
C

Chris Angelico

Syedk@syedk-ThinkPad-T410:~/shogun-2.0.0/src/interfaces/cmdline_static$ shogun | more

This implies that you have something called 'shogun', without an
extension, in your $PATH. Where is the actual script? You may need to
install it by a quite different method, to make it available in
Python.

ChrisA
 
P

Peter Otten

syed said:
I am trying to do a "import shogun" in my python script. I can invoke
shogun with a command line with no problem. But I cannot with a python
import statement.

Syedk@syedk-ThinkPad-T410:~/shogun-2.0.0/src/interfaces/cmdline_static$
shogun | more libshogun (i686/v2.0.0_9c8012f_2012-09-04_09:08_164102447)

Copyright (C) 1999-2009 Fraunhofer Institute FIRST
Copyright (C) 1999-2011 Max Planck Society
Copyright (C) 2009-2011 Berlin Institute of Technology
Copyright (C) 2012 Soeren Sonnenburg, Sergey Lisitsyn, Heiko Strathmann
Written (W) 1999-2012 Soeren Sonnenburg, Gunnar Raetsch et al.

( configure options: "configure options --interfaces=python_static"
compile flag s: "-fPIC -g -Wall -Wno-unused-parameter -Wformat
-Wformat-security -Wparenthese s -Wshadow -Wno-deprecated -O9
-fexpensive-optimizations -frerun-cse-after-loop -fcse-follow-jumps
-finline-functions -fschedule-insns2 -fthread-jumps -fforce-a ddr
-fstrength-reduce -funroll-loops -march=native -mtune=native -pthread"
link flags: " -Xlinker --no-undefined" ) ( seeding random number generator
with 3656470784 (seed size 256)) determined range for x in log(1+exp(-x))
is:37 )
Python 2.7.3 (default, Apr 10 2013, 05:46:21)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named shogun

Poking around a bit on the project's website

http://shogun-toolbox.org/doc/en/2.0.1/interfaces.html

it looks like you are trying to use their "modular" interface when you have
only installed the "static" one. I'm guessing that

will work.
 

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top