<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Dec 30, 2014 at 3:51 PM, Doug Blank <span dir="ltr"><<a href="mailto:doug.blank@gmail.com" target="_blank">doug.blank@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Tue, Dec 30, 2014 at 2:28 PM, Fernando Perez <span dir="ltr"><<a href="mailto:fperez.net@gmail.com" target="_blank">fperez.net@gmail.com</a>></span> wrote:<br></span><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">Hi Doug,</div><div class="gmail_extra"><span><br><div class="gmail_quote">On Tue, Dec 30, 2014 at 9:57 AM, Doug Blank <span dir="ltr"><<a href="mailto:doug.blank@gmail.com" target="_blank">doug.blank@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">I think that if "python setup.py install --user" under a venv went to the virtual env's local, then everything would be fine. But maybe I'm doing something wrong (need to use pip?).</blockquote></div><div class="gmail_extra"><br></div></span>The issue is that the list of targets is hardcoded here:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><a href="https://github.com/ipython/ipython/blob/master/IPython/kernel/kernelspec.py#L21" target="_blank">https://github.com/ipython/ipython/blob/master/IPython/kernel/kernelspec.py#L21</a></div><div class="gmail_extra"><br></div><div class="gmail_extra">that code isn't currently aware in any way of virtualenvs.</div><div class="gmail_extra"><br></div><div class="gmail_extra">I'm fuzzy on the details of how we ended up deciding we'd interact with venvs, other than saying that we'll try to bake as little knowledge of 'environment managers' (venv, conda, etc) directly into our kernel installation tools directly.  That discussion has lots of subtly interacting moving parts, and I'm afraid to say something misleading right now.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Min and Thomas were deep in those details, and I'd wait for further feedback from them (or anyone else who remembers well).  But in the meantime, you may want to play with that code in a local copy: you may find a minimally intrusive improvement for venv support that could be a good solution for a PR.</div></div></blockquote><div><br></div></span><div>Actually, the kernel is installed fine, and is found in the user's kernel area. It is the installed Python code with "--user" that causes the issue. Maybe this is just a venv/setup interaction bug.</div></div></div></div></blockquote><div><br></div><div>I see that distutils can use either a --user flag or a --prefix flag, but not both at the same time. Adding a "prefix" kwarg option could also work for install_kernel_spec, and would solve the problem that I am currently running into with venv with --user.<br></div><div><br></div><div>Min and/or Thomas: does that sound like a viable option?</div><div><br></div><div>-Doug</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class=""><font color="#888888"><div><br></div><div>-Doug</div><div> </div></font></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class=""><div dir="ltr"><div class="gmail_extra"><br></div><div class="gmail_extra">Cheers,</div><div class="gmail_extra"><br></div><div class="gmail_extra">f</div><span><font color="#888888"><div class="gmail_extra"><br><br clear="all"><div><br></div>-- <br><div>Fernando Perez (@fperez_org; <a href="http://fperez.org" target="_blank">http://fperez.org</a>)<br>fperez.net-at-gmail: mailing lists only (I ignore this when swamped!)<br>fernando.perez-at-berkeley: contact me here for any direct mail<br></div>
</div></font></span></div>
<br></span><span class="">_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org" target="_blank">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br></span></blockquote></div><br></div></div>
</blockquote></div><br></div></div>