[IPython-dev] Behavior of Default Kernel
Zachary Jones
zach at zacharyjones.us
Mon Dec 22 16:30:52 EST 2014
To follow up on this...
After stepping through code, I found my way to this URL:
http://localhost:80000/api/config/tree
Which returns: {"NewNotebookWidget": {"default_kernel": "python3"}}
While http://localhost:8000/api/kernelspecs
returns {"default": "na_python2", ...}
So it looks like something is off with the code path for '/api/config/tree'
Thanks,
Zach
On Fri, Dec 19, 2014 at 6:03 PM, Zachary Jones <zach at zacharyjones.us> wrote:
> Hi everyone,
>
> I have a question about the behavior of default kernels
>
> I was testing IPython from github today (commit hash: dc60d34) and wanted
> to understand if the behavior I am seeing is expected.
>
> The IPython notebook server is running under Python3.4, but I would the
> default kernel to be a custom Python 2 stack.
>
> Running "ipython kernelspec list" from the CLI returns:
> Available kernels:
> python3
> my_python2
>
> I invoked IPython notebook using the default_kernel_name:
> '--MappingKernelManager.default_kernel_name=my_python2'
>
> The API call to http://localhost:8000/api/kernelspecs returns:
> {
> "default": "my_python2",
> "kernelspecs": {
> "my_python2": {
> "env": {},
> "argv": [*omitted*],
> "name": "my_python2",
> "display_name": "My Python2 Stack"
> },
> "python3": {
> "env": {},
> "argv": [*omitted*],
> "name": "python3",
> "display_name": "IPython (Python 3)"
> }
> }
> }
>
> With this configuration, I observed the following:
>
> - When I go to to the notebook dashboard, next to the "New Notebook"
> button is "IPython (Python 3)" and the hover over says "IPython (Python 3)
> is the default kernel for new notebooks".
> - When I click on "New Notebook", the notebook opened uses "IPython
> (Python 3)" kernel.
> - When I open existing notebooks that are being converted from v3 to
> v4, the notebooks open using "My Python 2 Stack" kernel.
> - When I open an existing notebook that has had the kernel spec
> inserted into metadata, that kernel is used.
>
>
> *Finally to my questions..*
> Is the default_kernel_name supposed to be used when the "New Notebook"
> button is pressed? and is it suppose to be shown next to the "New Notebook"
> button?
>
> If the answers are yes, should I open an Issue in GitHub? I tried looking
> for an existing issue, but did not turn up anything.
>
>
> Thanks for your help,
> Zach Jones
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20141222/575d9d6d/attachment.html>
More information about the IPython-dev
mailing list