nteract / hydrogen

:atom: Run code interactively, inspect data, and plot. All the power of Jupyter kernels, inside your favorite text editor.
https://nteract.gitbooks.io/hydrogen/
MIT License
3.92k stars 334 forks source link

Kernel connection with Windows 10 WSL #1914

Open aminya opened 4 years ago

aminya commented 4 years ago

Currently, Hydrogen isn't able to connect to the kernels that are running locally by the WSL:

Using the following remote server config

[{
  "name": "WSL server",
  "options": { "baseUrl": "http://127.0.0.1:8888/" }
}]

It asks for the token, and after authentication and starting a new session, it fails to detect the kernel specs leaving the user with an empty selector: image

While checking the kernelspec in wsl gives a list:

(cling) $ jupyter kernelspec list
Available kernels:
  cling      /home/aminya/.local/share/jupyter/kernels/cling
  python3    /home/aminya/miniconda3/envs/cling/share/jupyter/kernels/python3
  xcpp11     /home/aminya/miniconda3/envs/cling/share/jupyter/kernels/xcpp11
  xcpp14     /home/aminya/miniconda3/envs/cling/share/jupyter/kernels/xcpp14
  xcpp17     /home/aminya/miniconda3/envs/cling/share/jupyter/kernels/xcpp17
aviatesk commented 4 years ago

Did you follow the instructions here ? You need to set authentication token in the config as well. I'm able to connect to e.g. IHaskell kernel in WSL.

aminya commented 4 years ago

Yes. I tried both hard coding the token, and also giving it when Atom asks for.

roie-fn commented 3 years ago

A small gotcha that's tripped me up with this in the past -- the grammar selected by Atom for the active file needs to match an installed kernel spec. If you try to connect while viewing a new file, ctrl-shift-L & select python before connecting Hydrogen.