Julia Kernel in Anaconda

I’m new to Julia but taking a Julia course on Coursera and am working through a tutorial book. I have a Julia 1.6.1 kernel in my Anaconda 3 (Jupyter Notebook version: 6.5.2) and everything worked fine all week (set up 3 notebooks from the book tutorial and 6 from the class), but last night the Julia kernel stopped connecting (the Python and Scala kernels still work, so I don’t think the problem is with Anaconda or Jupyter).


p.s. I’ve tried restarting the kernel and I’ve tried shutting down Anaconda completely and restarting it. I get the same ‘cannot connect’ error.

Did you move or update Julia? Try re-building IJulia.

Hi stevengj,
Your suggestion seems to have led me down the correct path:
I tried to open the REPL to re-add IJulia but the 1.6.1 REPL wouldn’t open, and that reminded me that I was using the 1.8.5 REPL in the book tutorial and I made a startup.jl file to automatically load some packages. It looks like the startup.jl file was causing a conflict…I changed it’s name and now Julia works in Anaconda again.

(I have both 1.6.1 and 1.8.5 installed (I kept 1.6.1 b/c I know the stuff I have works in it, but I want to try out 1.8 too…so I’ve been using 1.6 in Anaconda and 1.8 in VScode and the REPL)).

Incidentally, do you have any suggestions on making the startup.jl file work for both versions? It’s not a big deal if I can’t make it work, but I’d rather not have to type import and using lines for each new session if I don’t have to.

Thank you very much for your help!

You can check the VERSION variable

julia> VERSION
v"1.9.0-rc2"

julia> VERSION > v"1.8"
true

julia> VERSION < v"1.8"
false

and using comparisons and some if-statements you could probably use the same startup file for multiple versions of julia.

1 Like