IJulia Kernel not starting unless IJulia is installed in the global environment, ie (v1.1)

#1

I recently updated my mac to latest Mojave (10.14.3) and it looks like IJulia no longer works (Safari 12.0.3). The executed cell just hangs and never returns. I see lots of JS errors.

julia> versioninfo()
Julia Version 1.1.0
Commit 80516ca202 (2019-01-21 21:24 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin14.5.0)
  CPU: Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
#2

Works for me.

#3

If you’re seeing Javascript errors, then the problems aren’t due to IJulia but rather to Jupyter itself. If you are using an old Jupyter installation maybe you need to update it. (If you are using Julia’s own Jupyter installation, do using Conda; Conda.update())

#4

Thanks. I did a fresh install so it’s the latest Conda. Also, I can’t run using Conda as it’s not explicitly added to the project.

(data-exploration) pkg> st
    Status `~/Dropbox/Projects/data-exploration/Project.toml`
  [a93c6f00] DataFrames v0.17.1
  [c91e804a] Gadfly v1.0.1
  [7073ff75] IJulia v1.17.0
  [39abe10b] MySQL v0.7.0+ #master (https://github.com/JuliaDatabases/MySQL.jl.git)
  [295af30f] Revise v1.0.2
  [340e8cb6] SearchLight v0.8.0 [`~/.julia/dev/SearchLight`]
julia> using Conda
ERROR: ArgumentError: Package Conda not found in current path:
- Run `import Pkg; Pkg.add("Conda")` to install the Conda package.

Upon further investigation, the JS errors seem irrelevant. The real issue seems to be that the Julia Kernel doesn’t start. The Python kernel starts just fine (despite showing a bunch of JS errors too).

#5

Hmmm… Looks like the actual problem is that IJulia won’t work unless it’s installed in the global environment, ie (v1.1). If it is installed in a Project only, it seems to fail to start the kernel.

#6

If you want to run it in particular project, you can do so but you need to install a custom kernel specification that passes --project=.... when it launches julia.

1 Like
#7

Is it possible to detect that IJulia is installed in a non-default project in the build script? It would be nice to not install the kernelspec and show a warning message when there is no IJulia in the default project.

#8

I guess the build script could install the kernel for the current project?

#9

You mean to create ~/.local/share/jupyter/kernels/julia-$PROJECT_ID-1.1 (and alike in non-*nix)? But how do you determine $PROJECT_ID? Maybe the sha1 of the path to Project.toml or something?

Actually, I think it’s better to discourage people for installing IJulia to non-default project. We have stackable LOAD_PATH so I don’t think you need to install IJulia in each project for most of the cases (though I’m not super sure).