1
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

1 Answer 1

0

IJulia.jl installs kernels using the JUPYTER_DATA_DIR environment variable. This can be set via your shell, or in Julia as

ENV["JUPYTER_DATA_DIR"] = "/usr/local/share/jupyter/"

(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.installkernel

Where the .julia directory is located is an entirely different question, and is controlled by the JULIA_DEPOT_PATH environment variable: see https://docs.julialang.org/en/v1/manual/environment-variables/#JULIA_DEPOT_PATH

This in turn is used to define Base.DEPOT_PATH which can be called in the Julia REPL to see its value.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.