fredrikekre / Literate.jl

Simple package for literate programming in Julia
https://fredrikekre.github.io/Literate.jl
Other
534 stars 61 forks source link

Jupyter notebooks not working when running in different Julia versions #239

Closed dlfivefifty closed 6 months ago

dlfivefifty commented 6 months ago

I have a bunch of Jupyter notebooks I generated in Julia v1.10, see for example:

https://github.com/Imperial-MATH50003/MATH50003NumericalAnalysis/blob/main/labs/lab7.ipynb

But when a student opens it in Julia v1.10.1 it just says "kernel error": it won't run with a new kernel. I saw this issue before when I generated the notebooks in Julia v1.9 and tried to run them in Julia v1.10.

As I have a Julia-based exam in 2 weeks it would be great to have a solution to this 😰!

fredrikekre commented 6 months ago

You generated with 1.10.0 and it doesn't work in 1.10.1? I can't reproduce and I don't quite see why it would be Literate's fault. I would be surprised if the kernel that it tries to use is usable at all then. Do other notebooks work?

Perhaps a missing pkg> build IJulia after a Julia upgrade?

dlfivefifty commented 6 months ago

Maybe it’s a Mac specific bug? All machines I’ve seen this on are macs.

I’ve tried rebuilding IJulia but it didn’t resolve the issue. I guess it might be a Jupyter bug if there’s no issue with the generated ipynb file.

dlfivefifty commented 6 months ago

Hmm I just tried it again on my machine and I can't reproduce. Maybe you are right and we forgot to run ]build IJulia, or it's some other more subtly bug. I'll close this now.