syed khalid wrote: > 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. > >>>>>>invoking python from a command line........... > > 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 ) > >>>>Trying to call python from a script in the same directory where I >>>>invoked the shogun from a command >>>>linesyedk@syedk-ThinkPad- T410:~/shogun-2.0.0/src/interfaces/cmdline_static$ >>>>python > 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. >>>> import shogun > 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 >>> import sg will work. -- http://mail.python.org/mailman/listinfo/python-list