-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IPython notebook can't connect to existing kernel #4066
Comments
this is correct and is a known issue: a notebook MUST start its own kernel at the moment, though other clients can connect to that kernel. It's a limitation of the way we communicate with the webserver (via websockets), and some assumptions that the javasciript side, but this will be refactored and will probably be possible to connect a notebook to another kernel in the next version of IPython (2.0 around Decemeber of this year, and note the capitalization 😉 ) |
Great, looking forward to IPython 2.0! |
Another very useful addition to spawning a notebook that connects to a running console would be to let the |
I don't think we have any plans to support |
Still, it would be great to have, in the "Kernel" menu, an option "Attach to current", which would allow the user to pick any of the currently unused notebooks, or a new one, and then open it in a new page, connected to the current kernel. The result would be analogous to what one already gets by clicking twice on the same notebook name in the Dashboard (and which I find great when I want to have two tabs side by side, one for playing with the variables, the other for the final code - everything apparently works flawlessly, including kernel restarts/interrupts/deaths), but without the mess of the two pages saving to the same file. As long as the Dashboard does not assume/enforce somewhere a one-to-one mapping between notebooks and kernels, this should not be so complicated to implement, right? |
I remain -1 on this idea. The difficulty is that the abstraction of a one-to-one mapping between Also, separating these two things from each other introduces a new On Sat, Jan 11, 2014 at 1:11 PM, Pietro Battiston
Brian E. Granger |
Sure, I do understand it would probably not be a mainstream future, and that's why I would hide it in the "Kernel" menu, rather than expose it in the Dashboard. But that said, I just had no idea about the implementation difficulties, so thanks for the clarification. |
Just to clarify that it not a limitation of any individual component of the notebook, it is an assumption made in the current design of the notebook application as a whole that this 1:1 relationship exists. You can easily make a different web application that changes the relationship of notebooks and kernels (e.g. all notebooks share one kernel, or every visit to a notebook page gets a new kernel, etc.). What is difficult, and probably out of scope at this point, is supporting different kinds of relationships in the existing application. |
Just FYI, the sage cell design (which uses the IPython kernel javascript and architecture) does instantiate a new kernel for every cell on a page. It is definitely possible. |
and the singlecell demo is an example of an application where everything shares a single kernel. |
It's no problem, here's a fix: http://stackoverflow.com/questions/20091154/sharing-a-namespace-across-multiple-ipython-notebooks |
This is highly confusing because of all the talk in the documentation about the difference between kernels and frontends. Essentially the point is that the notebook frontend is NOT decoupled from kernels. This is not written in the documentation. At the very least it should be noted somewhere that the notebook must run its own kernel. The documentation explicitly says that the QT frontend can connect to existing kernels. Why doesn't it say that the notebook frontend does not support this? |
Agreed! For all that talk of decoupling.... |
Bump? I've seen probably a dozen or so versions of this how-to/feature request in various github repos and stackoverflow posts along the way to this issue... including: https://groups.google.com/forum/#!topic/jupyter/lVhTvgUbkXU (exactly my use-case) |
I think it's a reasonable decision not to disrupt your existing design by not adding the feature like this. Is it possible you provide an example bridge kernel? (just like echo_kernel example, but a little more sophisticated.)
After writing that bridge kernel as an example, you simply announce you won't do technical support for that example. (except bug fix) |
Isn't there a way to have the IPython notebook to connect to an already-running kernel? It seems like the --existing flag is not supported for the notebook subcommand.
I usually start a single kernel on the console when I begin my development, but may want to switch to the notebook once I have written and tested some functions. It would be useful to boot up the notebook from the same kernel, so that I don't have to duplicate everything. Is there a reason why this is not supported?
The text was updated successfully, but these errors were encountered: