JuliaLang / IJulia.jl

Julia kernel for Jupyter
MIT License
2.8k stars 412 forks source link

IJulia and Project.toml #925

Open oschulz opened 4 years ago

oschulz commented 4 years ago

Since a while ago, the IJulia Jupyter kernel is configured to activate a project ("Project.toml" and "Manifest.toml") if detected. But I've been wondering - should the users add IJulia to the "Project.toml" or not? I think we should give some guidance here in the docs - I'm actually not sure what is best:

If IJulia is in the Project.toml, this will guarantee that it's present, an in a verison compatible with the notebook (which may use some IJulia functionality directly). But on the other hand, on Project activation it would install the kernel spec, and overwrite the kernel installed by an IJulia installed in the default shared project ("v1.x").

Or maybe it would be better for the Jupyter kernel spec to not use an absolute path in the future, but a path relative to the currently active IJulia package?

goerz commented 2 weeks ago

I'd say you should never have IJulia in a project environment. Only in your base environment, and then edit your kernel.json file (see jupyter kernelspec list) to contain "--project=@."

That used to be the default, and in my opinion it should still be the default. See #1123 (and #928 for the counter-argument).

oschulz commented 2 weeks ago

I'd say you should never have IJulia in a project environment.

Yes, this is what I'm currently telling people who are new to Julia. It is a bit of an unexpected pitfall, though, so if there is a way for the for the Jupyter Julia kernel spec to not use an absolute path, that would be cool.