It is possible to share data across Jupyter notebooks. However packages need to be loaded for working on individual notebooks.
I am wondering whether it is also possible to share loaded packages in a similar way?
In JupyterLab, what I usually do is open a new notebook, and change the kernel of that notebook to the same kernel as a main opened notebook. In that way, all notebooks will have the same kernel, and all loaded packages and compiled functions are the same across notebooks.
The two notebooks I open use the same kernel “Julia 1.0.2”. Still when I run those notebooks, the package loading happen for each notebook.
It is not clear to me how to avoid package loading/compilation for the second notebook and share the already loaded packages from the first notebook. The packages are sitting in memory so I wonder whether it is possible.
I guess you’re using Jupyter Notebook, not Jupyter Lab. In Jupyter Lab as in the picture, I can select the kernel of “temp.ipynb” as “MAIN.ipynb”. Then all packages loaded in “MAIN.ipynb” will be usable in “temp.ipynb” without compilation.
@vietspaceanh: Thanks I see that. Yes I am using Jupyter notebook and there I don’t see any such item.