Search code examples
ubuntujupyter-notebookjuliajupyterputty

How to make julia kernel available when running jupyter notebook on remote server


I am running my jupyter notebook on ubuntu on a VM but I don't know how to make the Julia kernel available in this case. Can someone help?

Thank you!


Solution

  • You have to install Julia and the IJulia package on the VM.

    Assuming you're running a generic Linux on the VM, the steps should be (roughly) like this:

    1. Download Julia: wget https://julialang-s3.julialang.org/bin/linux/x64/1.2/julia-1.2.0-linux-x86_64.tar.gz
    2. Unpack the tarball: tar -xf julia-1.2.0-linux-x86_64.tar.gz
    3. Execute Julia: ./julia-1.2.0/bin/julia
    4. Install IJulia: ] add IJulia
    5. Start the Jupyter notebook server (from within Julia): using IJulia; notebook()

    In principle, IJulia should figure out which local python you are using and will use this existing one. In this case the Julia Kernel should be available even if you start the jupyter notebook server from outside of Julia. If it can't figure it out, open Julia and set ENV["PYTHON"] = "/my/path/to/python" followed by ] build IJulia. If you don't know what /my/path/to/python is use which python to find out. For more, see IJulia.jl.