Julia kernel & Jupyter notebook in VSCode

I try to run a Jupyter notebook in VSCode (v.1.81.1) with Julia 1.9.2 installed.

Problems:

  • Julia 1.9.2 is not available when I try to choose kernel for the Jupyter notebook [there is a Julia release channel, though – is that what I should choose?]

Did you install IJulia.jl. If so, type the command Pkg.build("IJulia"). I do this everytime I update Julia and it works smoothly.

I don’t think IJulia.jl is needed for vscode, but others might know better. Rather, I would guess that VScode simply cannot find you Julia installation.

You could test that my just creating a small script in vscode, like a file with the command println(3.1) and then try to run it by ctrl-shift-p and then look for Julia: execute active fil REPL. If this indeed fails, then you need to tell vscode where Julia is. There’s an option for that (settings…)

IJulia.jl is not needed when running Jupyter notebooks in VSCode.

After I chose to use the “Julia release channel” instead of looking for a specific version number, it seems like it uses Julia v. 1.9. Perhaps this is related to the fact that I use the Juliaup system for upgrading Julia? (The Julia app in Windows Store is developed (?) by the same group at Stanford that works with the Julia support in VSCode, I think).

Sorry, I don’t know much about the juliaup thing.

I never paid attention to this, because I use Ijulia in both VSCode and web browser. Thanks for the tip.

I tried running jupyter notebooks in VSCode but it was significantly slower than running notebooks in Jupyter or JupyterLab. The difference in performance was very significant, and it actually frustrated me. :sob:

If you want to run notebooks with Julia, I really feel that Pluto is the best way to go. I have been taking many courses on JuliaAcademy, most of which use Jupyter Notebooks… and I find that I have to update a lot of the code. The course(s) that provide Pluto Notebooks are much easier because they keep the package versions used when they were created. Also, they feel at least as fast as Jupyter notebooks and are reactive.

1 Like

Thanks for insight. I never noticed a difference when running Jupyter notebooks in VSCode vs. in a browser via IJulia. But perhaps I combined the switch with changing computer… I do find running notebooks in VSCode superior to using a browser from the convenience side, though: in VSCode, it is straightforward to do search and replace, etc.

I’m certainly interested in Pluto for 3 reasons: (i) it is Julia based, (ii) I assume it is faster, and (iii) it has useful widgets. A few things has held me back… (a) lazyness, (b) the reactiveness – which makes it difficult to re-use the same variable name several places (maybe that is lazyness, too), (c) I find it counter-intuitive that cell responses show up above the cells… since I’m used to the Western writing system with information flow left-to-right and top-to-bottom. But perhaps I should instead think of the cell content as caption, and the response as “figure” – captions are often placed below figures. And (d) with reactive programming, I’m uncertain as to how large Pluto notebooks can be. But I may start to use it.

The Pluto devs seems pretty ignorant to user demands like: Why is cell output above code? · Issue #205 · fonsp/Pluto.jl · GitHub https://github.com/fonsp/Pluto.jl/issues/65 so I woudn’ t use it either.

I don’t like to describe others as “ignorant”. An alternative interpretation is that they have a strong/well thought out idea of what Pluto should be like, and that they stick to this. There are a lot of things to like about Pluto.

3 Likes

There is no need to demean the Pluto devs. That’s totally uncalled for. They take their time to develop a FREE tool that is really amazing, and this is what you have to say?

If you don’t like it… fork it and change the things that you don’t like.

1 Like

And end up like GitHub - compleathorseplayer/Neptune.jl: Simple (Pluto-based) non-reactive notebooks for Julia ?