Skip to content
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

Possible to join existing local kernels with hydrogen? #133

Closed
mrchrisadams opened this issue Nov 9, 2015 · 2 comments
Closed

Possible to join existing local kernels with hydrogen? #133

mrchrisadams opened this issue Nov 9, 2015 · 2 comments

Comments

@mrchrisadams
Copy link

Hi there,

I might have missed this earlier, but is it possible to use Hydrogen just like another client to connect to an existing Jupyter Kernel?

If I start a Jupyter notebook session like so:

jupyter notebook

I can join that same kernel from the console with:

jupyter console --existing

This means I can define variables or methods , in one session, and then call them from the other, which can be handy for all kinds of reasons. Is it possible to do the same with Hydrogen too, so I can send code I write in Atom the same kernel?

This gist here mentioned in issue #38 makes me think it can, but I don't yet understand what kernelspecs are with Jupyter, and how to use them.

The way hydrogen works is... if it doesn't find a running kernel around (on the local machine), then it opens up a process, but the good thing is that it actually looks for kernelspecs before it does that! which is why this method works.

For my use case, I don't need to speak to any remote machines.

FWIW, I tried going the other way (as in start a kernel from Atom with hydrogen run and join it from a console with jupyter console --existing, with no joy.)

Thanks for making such an awesome package BTW 👍

@willwhitney
Copy link
Collaborator

You should be able to join a kernel that was started by Hydrogen, but not (currently) vice versa. Located in <hydrogen_install_directory>/kernel-configs you will find the configurations that Hydrogen builds to launch its kernels. If you launch a kernel by running some code in Hydrogen, you can then run jupyter console --existing <hydrogen-dir>/kernel-configs/kernel-<blah>.json on the config file that Hydrogen created, thus connecting a console session to your running kernel.

@oztalha
Copy link

oztalha commented Dec 15, 2017

Yes. I was able to connect to a kernel that was started by jupyter notebook command.
In the package settings in atom, simply set your kernel gateway like this:

[{"name": "my local","options":{"baseUrl":"http://localhost:8888/","token":"0ce3d02e994b89d5ea4dec15ac9c5805b6ed3cd31b275127"}}]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants