# Sharing loaded Julia packages across Jupyter notebooks

**URL:** https://discourse.julialang.org/t/sharing-loaded-julia-packages-across-jupyter-notebooks/17982
**Category:** Tooling
**Tags:** question
**Created:** [November 25, 2018, 4:11pm UTC](https://discourse.julialang.org/t/sharing-loaded-julia-packages-across-jupyter-notebooks/17982 "2018-11-25T16:11:22Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Ajaychat3](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@Ajaychat3](https://discourse.julialang.org/u/Ajaychat3)
#### Post date: [November 25, 2018, 4:11pm UTC](https://discourse.julialang.org/t/sharing-loaded-julia-packages-across-jupyter-notebooks/17982/1 "2018-11-25T16:11:22Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![vietspaceanh](https://avatars.discourse-cdn.com/v4/letter/v/e79b87/32.png) [@vietspaceanh](https://discourse.julialang.org/u/vietspaceanh)
#### Post date: [November 25, 2018, 7:13pm UTC](https://discourse.julialang.org/t/sharing-loaded-julia-packages-across-jupyter-notebooks/17982/2 "2018-11-25T19:13:20Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Ajaychat3](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@Ajaychat3](https://discourse.julialang.org/u/Ajaychat3)
#### Post date: [November 26, 2018, 1:33am UTC](https://discourse.julialang.org/t/sharing-loaded-julia-packages-across-jupyter-notebooks/17982/3 "2018-11-26T01:33:36Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![vietspaceanh](https://avatars.discourse-cdn.com/v4/letter/v/e79b87/32.png) [@vietspaceanh](https://discourse.julialang.org/u/vietspaceanh)
#### Post date: [November 26, 2018, 2:25am UTC](https://discourse.julialang.org/t/sharing-loaded-julia-packages-across-jupyter-notebooks/17982/4 "2018-11-26T02:25:57Z")

</div>

![Untitled](https://global.discourse-cdn.com/julialang/original/3X/7/3/737dc0f2b50f3de0e63c979f74f07295a5de191e.png)

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.

---

<div class="post-metadata">

### Author: ![Ajaychat3](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@Ajaychat3](https://discourse.julialang.org/u/Ajaychat3)
#### Post date: [November 26, 2018, 3:48am UTC](https://discourse.julialang.org/t/sharing-loaded-julia-packages-across-jupyter-notebooks/17982/5 "2018-11-26T03:48:50Z")

</div>

@vietspaceanh: Thanks I see that. Yes I am using Jupyter notebook and there I don’t see any such item.
