7

With the latest version of IPython, kernels can be registered by placing a kernel.json file in ~/.ipython/kernels/<kernel-name>/.

I am currently trying to add a julia and a R kernel and I am wondering who is responsible for creating and maintaining those kernel.json files.

Currently, I googled and created following kernel.json for julia by hand:

{
 "display_name": "Julia",
 "language": "julia",
 "argv": [
    "julia",
    "-i",
    "-F",
    "/User/<user>/.julia/v0.3/IJulia/src/kernel.jl",
    "{connection_file}"
 ],
 "codemirror_mode":"julia"
}

While this works, due the hardcoded path to kernel.jl I will have to adapt kernel.json for every major julia upgrade.

Do I have to take care of creating and maintaining these files? Or are they part of the kernel implementations or other third party packages?

cel
  • 30,017
  • 18
  • 97
  • 117

1 Answers1

1

Usually people create symbolic links to avoid depending on specific versions.

ln -s ~/.julia/v0.3 ~/.julia/latest

then you could use latest instead of v0.3 in kernel.json.

When you change versions you will only have to change the symbolic link.

anthonybell
  • 5,790
  • 7
  • 42
  • 60
  • Yes, that is an option. But IMO changing a symbolic link or editing a path in a config file does not make much of a difference. – cel Mar 28 '15 at 18:51
  • but with a symbolic link when you upgrade you *only has to change the link* instead of trying to change every program that has ever referenced it. – anthonybell Mar 29 '15 at 00:40
  • I agree that recreating a symlink is an improvement over revising multiple config files. But here I have just one config file, so in this specific case it may be a little cleaner, but does not really solve this issue. – cel Mar 29 '15 at 09:33