'How to add latest Julia version to Jupyter Notebook

I installed Julia 1.5.3 on my Linux Mint 20 system. I copied the Julia files in julia-1.5.3-linux-x86_64.tar.gz to /opt/julia-1.5.3/, adjacent to the folder /opt/julia-1.4.1/, (I did not change the path environment variable in .bashrc).

I ran Pkg.add("IJulia")in the Julia console.

So far so good, the new version runs if I start Julia from the command prompt. Atom / Juno also run the latest version.

But, if I run Jupyter from the Anaconda navigator, then I only see the older version of Julia, see this picture: https://i.imgur.com/WOy62Gw.png

How can I add julia-1.5.3 to that menu?



Solution 1:[1]

Have you installed IJulia, the Julia package which runs the jupyter kernel? If not that's what you're missing.

If you've got that already but you have updated your Julia version and can only see the old Julia kernel, You need to Pkg.build("IJulia") or ] build IJulia in pkg repl mode as the build script registers the kernel.

EDITED to add:

As this answer has received quite a few views and votes now, I'll add that in addition to running the build script there's also an installkernel function exported by IJulia which gives you more control over what type of kernel you want to add to Jupyter. As an example, a multithreaded kernel can be added like this:

installkernel("Julia (4 threads)", env = Dict("JULIA_NUM_THREADS" => "4"))

Here the first argument is the kernel name which will be displayed in the Jupyter GUI, and the Dict sets the environment variable needed to start a multi-threaded Julia process.

Solution 2:[2]

Try the following if you already have Julia and Jupyter installed

  1. open julia in terminal
  2. ] build IJulia
  3. using IJulia
  4. notebook()

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Seth