Use Julia from Jupyter notebook

less than 1 minute read

Related: Install Julia IDE: Juno


IJulia allows running Julia from within the web browser IDE Jupyter.

Install

This installs its own Miniconda environment just for Julia.

  1. locate your Jupyter binary location
    which jupyter
    

    if it’s not installed, just do

    conda install jupyter
    
  2. install Julia
  3. start Julia with this environment variable (only necessary once)
    JUPYTER=~/miniconda3/bin/jupyter julia
    
  4. type at Julia prompt:
    Pkg.add("IJulia")
       
    Pkg.build("IJulia")
    

    This installs numerous packages via conda automatically.

Usage

  1. start the Notebook either by:

    • Terminal/Command Prompt: jupyter notebook
    • Julia: using IJulia; notebook()
  2. Create an interactive Julia .ipynb Julia notebook by clicking New → Julia. Existing .jl files are NOT runnable from IJulia.

Notes

Categories:

Updated:

Leave a Comment