Use Julia from Jupyter notebook
IJulia allows running Julia from within the web browser-based Jupyter IDE. In general (for all operating systems) it’s recommended to install and update Julia via the downloads from Julia website.
Install Jupyter: locate Jupyter binary location
- Windows:
where jupyter
- Linux, macOS:
which jupyter
If Jupyter is not installed, just do
conda install jupyter
Install IJulia: start Julia with this environment variable (only necessary once)
-
Linux / macOS:
JUPYTER=$(which jupyter) julia
-
Windows:
$Env:JUPYTER=$(where.exe jupyter) julia
Finally, type at Julia prompt:
using Pkg
Pkg.add("IJulia")
This installs numerous packages via conda automatically.
Existing .jl
files are NOT runnable from IJulia.
Start the Notebook by EITHER:
- Terminal/Command Prompt:
jupyter lab
- Julia:
using IJulia; notebook()
Create an interactive Julia .ipynb
Julia notebook by clicking New → Julia.
- IJulia install reference