I wrote the commands in ipython shell as you suggested so here we have the output result..<br><br><div class="gmail_quote">On Tue, Feb 26, 2013 at 12:05 PM, Yaroslav Halchenko <span dir="ltr"><<a href="mailto:debian@onerussian.com" target="_blank">debian@onerussian.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><br>
On Tue, 26 Feb 2013, Abduljalil Sireis wrote:<br>
<br>
</div><div>> Â Â Â head ./test.py # in your shell<br>
> Â Â Â then ?<br>
<br>
> Â Â #!/usr/bin/env ipython<br>
> Â Â # -*- coding: utf-8 -*-<br>
> Â Â """<br>
> Â Â Spyder Editor<br>
> Â Â This temporary script file is located here:<br>
> Â Â /home/brain/.spyder2/.temp.py<br>
> Â Â """<br>
</div>> Â Â Â > >...<<br>
<div>> Â Â /home/brain/ipython scripts/test.py in <module>()<br>
> Â Â Â Â Â 12 import mvpa2.suite as mvpa2<br>
> Â Â Â Â Â 13 import IPython<br>
> Â Â ---> 14 IPython.embed()<br>
> Â Â Â Â Â 15Â <br>
> Â Â Â Â Â 16 path = os.path.join('brain')<br>
<br>
</div>ho ho -- that might be the source of the problem (something spyder<br>
injects having assumptions on ipython's version)<br>
<div><br>
>    >   �what happens if you run it with pure python, not ipython, i.e.<br>
> Â Â Â > Â Â Â python test.py<br>
> Â Â Â > Â Â Â ?<br>
> Â Â Â > Â Â AttributeError: 'module' object has no attribute 'embed'<br>
<br>
> Â Â Â so the same (thus not ipython-dependent), good<br>
<br>
</div>so I was wrong -- it is ipython dependent since script imports it ;)<br>
<div><br>
>    >    > � �2. output of�print mvpa2.wtf()<br>
> Â Â Â > Â Â Â that should be ran in (i)python interpreter (e.g. just start<br>
> Â Â Â ipython,<br>
> Â Â Â > Â Â Â and<br>
> Â Â Â > Â Â Â then type<br>
> Â Â Â > Â Â Â mvpa2.wtf()<br>
> Â Â Â > Â Â Â )<br>
>    >    > � �bash: syntax error near unexpected token `('<br>
>    >   �NameError: name 'mvpa2' is not defined<br>
<br>
> Â Â Â ;) ok -- first enter<br>
<br>
> Â Â Â import mvpa2<br>
<br>
>   i entered  import mvpa2.suite as mvpa2<br>
> Â Â shouldn't that be enough? :-)Â <br>
<br>
</div>should if import succeeds... now I see that we recommend this way in the<br>
FAQ but I guess we better advise not to import 'as mvpa2' but better as<br>
'as mv'.<br>
<br>
anyways -- if you imported it 'as mvpa2' and there were no errors you<br>
must be able to<br>
<br>
print mvpa2.wtf()<br>
<br>
if it doesn't work -- again -- copy/paste entire "protocol of struggle"<br>
not just the last error ;) Â so just do<br>
<br>
in your shell start ipython:<br>
<br>
ipython<br>
<br>
in ipython shell do<br>
<br>
import mvpa2<br>
print mvpa2.wtf()<br>
<br>
it must work and it would provide us all information neeeded<br>
<div><div><br>
--<br>
Yaroslav O. Halchenko<br>
<a href="http://neuro.debian.net" target="_blank">http://neuro.debian.net</a> <a href="http://www.pymvpa.org" target="_blank">http://www.pymvpa.org</a> <a href="http://www.fail2ban.org" target="_blank">http://www.fail2ban.org</a><br>
Postdoctoral Fellow, Â Department of Psychological and Brain Sciences<br>
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755<br>
Phone: <a href="tel:%2B1%20%28603%29%20646-9834" value="+16036469834" target="_blank">+1 (603) 646-9834</a> Â Â Â Â Â Â Â Â Â Â Â Fax: <a href="tel:%2B1%20%28603%29%20646-1419" value="+16036461419" target="_blank">+1 (603) 646-1419</a><br>
WWW: Â <a href="http://www.linkedin.com/in/yarik" target="_blank">http://www.linkedin.com/in/yarik</a><br>
<br>
_______________________________________________<br>
Pkg-ExpPsy-PyMVPA mailing list<br>
<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org" target="_blank">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa</a></div></div></blockquote></div><br>