5

I created a data_science kernel for ipython by using the following commands:

python -m ipykernel install --user --name data_science --display-name "Python (Data Science)"

This creates a kernel with all my conda/pip data science packages. I can create a notebook with the new kernel, but what I would really like is to add this kernel to the Hydrogen Package in my ATOM text editor.

How do I add this kernel to my Hydrogen ATOM package?

ccamara
  • 1,141
  • 1
  • 12
  • 32
spitfiredd
  • 2,897
  • 5
  • 32
  • 75

6 Answers6

2

If you're on windows you just need to reboot ATOM and it will automatically detected the new kernel.

spitfiredd
  • 2,897
  • 5
  • 32
  • 75
0

I think you don't do any additional to run Hydrogen with a new kernel.

  • Just press ctrl/cmd + shift + p to open command pallette,
  • then type in hydrogen select,
  • choose Hydrogen: Select Kernel

Hydrogen automatically will update kernel list and show you a message about it. Further you should see list and pick up from it necessary kernel. If you don't find the kernel it maybe be because there isn't a language field in the kernel.json. It should look like:

{
 "display_name": "Python 3",
 "argv": [
  "python",
  "-m",
  "ipykernel_launcher",
  "-f",
  "{connection_file}"
 ],
 "language": "python"
}

You can find kernel.json checking data-paths that listed by command $ jupyter --paths.

theotheo
  • 2,664
  • 1
  • 23
  • 21
0

The answer above did not work for me. I had to run Hydrogen: Update Kernels within atom in order for Hydrogen to see newly installed kernels. This is briefly mentioned in the atom website under the heading "Kernels".

hoj201
  • 178
  • 5
0
PyK: was my env name, which I get to with 

    $ source activate Pky

And within this I used the command

    (Pky)/path/name/ $python -m ipykernel install --user --name Pyk --display-name "Pky3"

This worked. Otherwise it would put in 
/miniconda3/envs/Pky/share/jupyter/kernels/python3/kernel.json 
which is useless for Atom
ls -l  ~/.local/share/jupyter/kernels/
total 8
drwxrwxr-x 2 oon oon 4096 Nov  2 19:55 julia-0.6
drwxrwxr-x 2 oon oon 4096 Nov  2 20:14 Pyk *
That's where it needs to be.
in 
    $jupyter --paths
    config:
        /home/hyoon/.jupyter
        /opt/miniconda3/envs/SPk/etc/jupyter
        /usr/local/etc/jupyter
        /etc/jupyter
    data:
        /home/hyoon/.local/share/jupyter
        /opt/miniconda3/envs/SPk/share/jupyter
        /usr/local/share/jupyter
        /usr/share/jupyter
    runtime:
        /run/user/1000/jupyter

Check all the dir in *data:

user6273920
  • 713
  • 1
  • 7
  • 16
0

run:

source activate thisenv

python -m ipykernel install --user --name thisenv

and then restart atom

Community
  • 1
  • 1
Bazzert
  • 77
  • 2
  • 7
0

Above solutions are not up to date or not enough.

follow and run it: https://nteract.io/kernels and after that restart Atom or type [Win10] Ctrl + Shift +P and update kernel, choose the option Hydrogen: Update kernels

matt91t
  • 103
  • 1
  • 8