Jupyter doesn't find Julia 1.11 kernel

Hi,
after upgrading my Mac (to Sequoia 15.0.1) and its Xcode and Homebrew packages I found that I cannot run Julia notebooks in Jupyter anymore, because the upgraded kernel (Julia 1.11.1) is apparently not found. Starting IJulia and opening a window with the Jupyter interface seems to work as usual, but when loading a notebook, I am presented with a window that asks me to select a kernel from a list that includes all the previous Julia versions I had installed (and have no more), but not the current one. This problem has never arisen before, as far as I recall; after previous upgrades the new Julia version was always found.

Did someone else encounter this problem as well, or does anybody know what to do?

in you Julia 1.11.1, have you run

]build IJulia

yet?

5 Likes

Have you done a

] build IJulia

in 1.11?

EDIT: Ha, ninja’d

2 Likes

Thanks, that was it.
I don’t recall having done that on earlier occasions, but maybe I’m getting old…

I have a similar problem with Julia 1.11.1. Kernels just don’t work. I get thousands of error messages as Jupyter tries over and over to load the kernel. Julia is trying to build Revise and OhMyRepl, which shouldn’t happen as both are already built when using Julia from the REPL. I have a startup_ijulia.jl that contains:

try
    using Revise
catch e
    @warn "Error initializing Revise" exception = (e, catch_backtrace())
end

So, OhMyREPL shouldn’t even be loaded. I am using the same Python 3 and Jupyter install that I was using with Julia 1.10.1. All these problems began with Julia 1.11.1.

I am going to downgrade to Julia 1.10.1 to see if can get everything working again. Will report back.

So, it’s broken in 1.10.6 in the same ways. With no change to Python or Jupyter, the default Julia kernel only works to create a brand new notebook. But, that notebook can never be loaded–the Julia kernel just hangs trying to connect as Julia keeps struggling to build Revise, and OhMyREPL.

Next, I 'll try just not having startup.jl and startup_ijulia.jl and report back…

Update: so things work a bit better with Julia 1.10.6:

  • I still can’t launch Jupyter with using IJulia; jupyterlab()
  • I can launch jupyter lab from the shell and create notebooks with the Julia 1.10.6 kernel.
  • I can save and reload the notebook and it connects to the 1.10.6 kernel.

So, big improvement. I guess I’ll just wait until someone can request some debugging info from me about 1.11.1: or perhaps the problems are known and there will be an update.

===============

Last update.

  • I re-enabled (renamed) startup.jl and startup_ijulia.jl.
  • launched jupyter lab from shell (not within Julia using IJulia)
  • opened previous notebook and all worked as expected.

So, I conclude something’s pretty broken in 1.11.1 around IJulia and working with Jupyter lab.

I prefer jupyter for many reasons over Pluto. Don’t want to get into a big fight over that.

Hm, I just checked and with 1.11.1 and IJulia 1.26.0 the default kernel also isn’t working for me (although I don’t see any errors).

That said I generally work with a custom kernel as I want to take advantage of multithreading, so I do

installkernel("Julia (20 threads)", env = Dict("JULIA_NUM_THREADS" => "20"))

And that custom kernel works just fine.

Did you try fixing the two most common configuration problems?

  1. Rebuild IJulia after updating or changing versions in juliaup
  2. Make sure IJulia is installed in your global environment (unless you install a custom kernel for a project)

See also the info in the IJulia manual on getting more debugging output.

99.9% of IJulia problems are due to configuration errors. There is no particular problem with 1.11 that I know of.

1 Like

If a custom kernel that just changes the number of threads works fine, likely you just need to rebuild IJulia to re-install your default kernel (because the location of the julia binary has changed).

That’s the first thing I do when changing Julia versions! Didn’t help this time unfortunately, the best I could get was the kernel is stuck in “initializing” with seemingly nothing happening, starting all over now it just says “connecting” for a long time before changing to “no kernel”, all without error messages.

You can sometimes get more error output by following the instructions here: Troubleshooting · IJulia

I believe you, of course. I do everything in the global environment. I have rebuilt IJulia multiple times. I set ENV[“JUPYTER”] to the binary for jupyter before I build. With 1.10.6 the kernel always starts, so I guess I’ll stick with it until there’s a maintenance release of 1.11. jupyter lab always starts from the shell; it’s not a big deal that it won’t start from Julia.

I realize it has to be a config problem. Any messages or logs that I can provide? I am not blocked from getting work done.

  • Lewis

I’ll give it a shot.

  • Lewis

So, your Julia 1.11.1 kernel hung even when you made a custom kernel?

hmmm, that seems to confirm there actually is something wrong with 1.11.1 or the compatible version of IJulia…

No, the custom kernel continues to work fine.

I am sorry but this is a perennial problem. When it happens it seems insoluble.

here is what I have done:
rm IJulia
delete the old Julia kernel from Library/Jupyter
upgrade jupyter via pip3
delete the IJulia folder so Pkg must download a fresh copy
set ENV[“JUPYTER”] to the path to its binary
install IJulia
build IJulia
using IJulia
jupyterlab()

or

in a shell jupyter lab

the kernel for julia 1.11.5 is there.

Jupyter never connects to it. Getting pretty sore about it. On another machine with a fresh install it works. On the current machine it has worked in the past. The upgrade to julia 1.11.5 seems to have broken.

Short of deleting all of Julia and just starting over I don’t see what is left to.

It shouldn’t be this way. Makes me wonder if this is a diss of jupyter to favor pluto (or uranus or asteroid_belt).

I had a similar problem when first upgrading to Julia 1.11. The issue was the Manfest.toml file from an older Julia version causing 1.11 to error. If that is also causing your issue, the solution is either deleting the Manifest.toml file in the current directory or editing your kernel to not load the manifest. In other words, delete the --project=@. option from the kernel. See this for more details: Jupyter cannot find the Julia 1.11 kernel - #9 by kpobrien