IJulia.jl icon indicating copy to clipboard operation
IJulia.jl copied to clipboard

Installing IJulia with IJULIA_NODEFAULTKERNEL fails

Open ARogovskyy opened this issue 2 years ago • 2 comments

If I install IJulia with IJULIA_NODEFAULTKERNEL, it fails. Stacktrae

ERROR: LoadError: UndefVarError: exe not defined
Stacktrace:
 [1] top-level scope
   @ ~/.julia/packages/IJulia/e8kqU/deps/build.jl:18
 [2] include(fname::String)
   @ Base.MainInclude ./client.jl:451
 [3] top-level scope
   @ none:5

The exe function is defined in deps/kspec.jl. However, this is only (indirectly) run in build.jl during the installation of the default kernel:

if !haskey(ENV, "IJULIA_NODEFAULTKERNEL")
   # Install Jupyter kernel-spec file.
   include("kspec.jl")
   kernelpath = installkernel("Julia", "--project=@.")
end

Thus, if we skip it, exe will not have been defined.

ARogovskyy avatar Mar 23 '22 16:03 ARogovskyy

I also came across this issue while installing IJulia.jl with IJULIA_NODEFAULTKERNEL flag. I fixed it by moving the include outside the conditional.

include("kspec.jl")

if !haskey(ENV, "IJULIA_NODEFAULTKERNEL")
   # Install Jupyter kernel-spec file.
   kernelpath = installkernel("Julia", "--project=@.")
end

jaantollander avatar Feb 24 '23 11:02 jaantollander

That change seems fine to me if you want to submit a PR.

stevengj avatar Feb 25 '23 17:02 stevengj