Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #51381
| From | Peter Otten <__peter__@web.de> |
|---|---|
| Subject | Re: python import module question |
| Date | 2013-07-28 10:44 +0200 |
| Organization | None |
| References | <f477e6b7-164b-4363-a22a-dd99fa16ab46@googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.5189.1375001043.3114.python-list@python.org> (permalink) |
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.
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
python import module question syed khalid <syedk@pacificloud.com> - 2013-07-27 16:15 -0700 Re: python import module question Chris Angelico <rosuav@gmail.com> - 2013-07-28 00:33 +0100 Re: python import module question Peter Otten <__peter__@web.de> - 2013-07-28 10:44 +0200
csiph-web