julia> using Pkg
julia> Pkg.add("IJulia")
Installing known registries into `~/.julia`
...
By default:
- Installs known registries into
~/.julia - Install kernel into
~/.local/share/jupyter/kernels/julia-1.8
Is it possible to do a system install instead of local install? e.g.
/usr/.julia/usr/local/share/jupyter/kernels/julia-1.8
I know specifying kernel path is possible from the Jupyter side: https://jupyter-client.readthedocs.io/en/latest/kernels.html#kernel-specs
But not sure if or how you can invoke this behavior from the julia shell https://julialang.github.io/IJulia.jl/stable/manual/installation/
Using Linux OS
IJulia.jl installs kernels using the
JUPYTER_DATA_DIRenvironment variable. This can be set via your shell, or in Julia as(see https://github.com/JuliaLang/IJulia.jl/blob/master/deps/kspec.jl) You can be even more fine-grained at the level of
installkernel: see IJulia.installkernelWhere the
.juliadirectory is located is an entirely different question, and is controlled by theJULIA_DEPOT_PATHenvironment variable: see https://docs.julialang.org/en/v1/manual/environment-variables/#JULIA_DEPOT_PATHThis in turn is used to define
Base.DEPOT_PATHwhich can be called in the Julia REPL to see its value.