[IPython-dev] Notebooks enforce specific kernel

Steve Holden steve at holdenweb.com
Mon Jun 29 12:14:34 EDT 2015


Inevitably, almost as soon as I had sent the message I found and deleted kernel specs in /usr/local/share/jupyter, which seems to solve the problem (as well as explain the message about "attempting to work in a virtual environment, as one of the specs was indeed pointing to en executable in a virtualenv).

regards
 Steve

On Jun 29, 2015, at 5:04 PM, Steve Holden <steve at holdenweb.com> wrote:

> Since this may be a configuration issue I thought I'd ask on the list before filing an issue.
> 
> I created a Python2 virtual environment and installed IPython[notebook] using pip, plus scipy and some other stuff. I then opened an existing notebook, only to find on executing it that it claims scipy isn't installed.
> 
> I noticed that the notebook had automatically opened with a Python 3 kernel, which I found very odd. sys.prefix tells me that it's running Python 3 from a completely unconnected virtual environment.
> 
> Now I did, once upon a time, attempt to install a Python2 kernel, but my configuration control isn't good enough to remind me what I did. I can't trace any reference to the "unconnected virtual environment" anywhere in my ~/.ipython directory. This raises two questions:
> 
> 1: Can anyone tell me where I may have installed this rogue kernel; and
> 
> 2: It seems notebooks contain a kernel specification of sorts. Does this mean I can't write a notebook that will run in both Python 2 and Python 3?
> 
> regards
>  Steve
> -- 
> Steve Holden steve at holdenweb.com / +1 571 484 6266 / +44 208 289 6308 / @holdenweb
> 
> 
> 
> 
> 

-- 
Steve Holden steve at holdenweb.com / +1 571 484 6266 / +44 208 289 6308 / @holdenweb





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20150629/cc8ff59d/attachment.html>


More information about the IPython-dev mailing list