Julia kernel won't connect to jupyter

This is another new one. It always used to work. I do NOT use conda or the 4 gigabyte Python it brings in. I use brew install python. I use pip to install extra components needed by jupyter. Until today, it has always worked. Python kernels work fine in notebooks.

In Julia I set, ENV[“JUPYTER”] = . Then I do pkg.build(“ijulia”).

Here is the kernel that julia builds the first time ever running using IJulia:

  "display_name": "Julia 1.9.1",
  "argv": [
    "/Applications/Julia-1.9.app/Contents/Resources/julia/bin/julia",
    "-i",
    "--color=yes",
    "--project=@.",
    "/Users/lewis/.julia/packages/IJulia/Vo51o/src/kernel.jl",
    "{connection_file}"
  ],
  "language": "julia",
  "env": {},
  "interrupt_mode": "signal"
}

Another OSS dependency stack fragility that is hard to diagnose. This is what I have done dozens of times with successful results.

I have upgraded pip and jupyter. I am using a fresh install of Julia 1.9.1. Don’t know what to do next…

I have reinstalled Python 3 times now. I have reinstalled Jupyter and Jupyter lab. I have rebuilt IJulia 3 times.

It used to work with no special tricks at all. Now it doesn’t.

No clue what to do now.

Does this section of the docs help?
https://julialang.github.io/IJulia.jl/stable/manual/usage/#Julia-projects

I’m fairly new to Julia, so I stumbled into a similar problem with Jupyter when I upgraded to version Jupiter 1.9.1. If I remember correctly I solved the problem by rebuilding IJulia. Here’s a link that I found useful:

How to add latest Julia version to Jupyter Notebook

Thanks for everyone’s responses and suggestions. I had always done those things and have setup IJulia and Jupyter many times.

This was a first. It works now. I did use IJulia to create a new kernel with installkernel. The new kernel worked, but also the old kernel that IJulia creates the first time it is loaded–from yesterday–also began working. Not clear what cleared things up. All is back too normal now.

I can also recommend using the Python Software Foundation installer for Macos with M1. I have a minimal install of the latest where it belongs. My entire Python with all the dependencies pulled in by jupyter is 509mb. I might get rid of matplotlib as I am a dedicated Plots user. That is a far cry from the 4gb of Anaconda. Even miniconda becomes > 3gb after conda installing jupyter.

My entire Julia installation with lots of packages used by one of my packages is 1.25gb.

We all have big machines now so saving this space is not essential, but bloat is bloat and lots of dependencies add to complexity. It’s also nice to know what you’ve got, why you’ve got it, and how it got there.

1 Like