IJulia.jl
IJulia.jl copied to clipboard
Installing IJulia with IJULIA_NODEFAULTKERNEL fails
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.
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
That change seems fine to me if you want to submit a PR.