I've had this problem in ubuntu as well. As Fernando said when you create a shortcut it inherits nothing from your environment. The work around I've come up with is to define the command as<br><br>sh -c "export PYTHONPATH=$PYTHONPATH:/path/to/local/python/scripts/; /usr/local/bin/ipython notebook --pylab inline"<br>
<br>Ben<br><br><div class="gmail_quote">On Fri, Jan 27, 2012 at 6:16 AM, Angus McMorland <span dir="ltr"><<a href="mailto:amcmorl@gmail.com">amcmorl@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2012/1/27 Fernando Perez <<a href="mailto:fperez.net@gmail.com">fperez.net@gmail.com</a>>:<br>
<div class="im">> 2012/1/27 Zoltán Vörös <<a href="mailto:zvoros@gmail.com">zvoros@gmail.com</a>>:<br>
>> when I put this into the menus, it fails for some reason.<br>
><br>
> This was the key piece of information you hadn't told us! I was<br>
> assuming you were starting it from the cmd line...<br>
><br>
> In general, anything you start from a menu/gui launcher does NOT<br>
> inherit your environment. You can see that by simply making a<br>
> launcher that calls a shell script that does<br>
><br>
> env > ~/env.txt<br>
><br>
> and you'll see an environment without your personal variables.<br>
><br>
> I think there's a way to set the env. so it's inherited by gui<br>
> launchers too, but I've never bothered to find out the details. I<br>
> just keep Tilda on call at F12 and start everything from it.<br>
<br>
</div>Assuming you're using standard Ubuntu (i.e. gnome-based), I think you<br>
want to define environment variables for the current session into<br>
.gnomerc in your home directory (create the file if it doesn't already<br>
exist). From there they get set for the current gnome session.<br>
<br>
Angus<br>
<div class="im HOEnZb"><br>
> Cheers,<br>
><br>
> f<br>
> _______________________________________________<br>
> IPython-User mailing list<br>
> <a href="mailto:IPython-User@scipy.org">IPython-User@scipy.org</a><br>
> <a href="http://mail.scipy.org/mailman/listinfo/ipython-user" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-user</a><br>
<br>
<br>
<br>
</div><span class="HOEnZb"><font color="#888888">--<br>
AJC McMorland<br>
Post-doctoral research fellow<br>
Neurobiology, University of Pittsburgh<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
IPython-User mailing list<br>
<a href="mailto:IPython-User@scipy.org">IPython-User@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-user" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-user</a><br>
</div></div></blockquote></div><br>