# Location of libraries or extensions installed in JupyterLab

**URL:** <https://discourse.jupyter.org/t/location-of-libraries-or-extensions-installed-in-jupyterlab/16303>\
**Category:** JupyterLab\
**Tags:** jupyterlab\
**Created:** [October 12, 2022, 12:24pm UTC](https://discourse.jupyter.org/t/location-of-libraries-or-extensions-installed-in-jupyterlab/16303 "2022-10-12T12:24:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rakesh\_K](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/rakesh_k/32/7108_2.png) [@Rakesh\_K](https://discourse.jupyter.org/u/Rakesh_K)\
**Post date:** [October 12, 2022, 12:24pm UTC](https://discourse.jupyter.org/t/location-of-libraries-or-extensions-installed-in-jupyterlab/16303/1 "2022-10-12T12:24:19Z")

</div>

I would like to understand some details about the extensions and external libraries installed in a JupyterLab environment. Specifically, I’d like to understand the location where such libraries are installed when someone does `pip install <library>`. Are these libraries installed in the Jupyter server or are they installed in the ipython kernel? Given that it is possible to connect to a remote kernel from JupyterLab, where are the libraries installed in that case? Currently, I have JupyterLab setup on my machine where the Jupyter server and the ipython kernel are present on the same machine. In the case where the kernel resides on a different machine from the Jupyter server, where are the library files installed? If they are installed on the Jupyter server, are they transferred over to the machine where the ipython kernel is running?

Thanks,  
Rakesh.

---

<div class="post-metadata">

**Author:** ![bollwyvl](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/bollwyvl/32/904_2.png) [@bollwyvl](https://discourse.jupyter.org/u/bollwyvl)\
**Post date:** [October 12, 2022, 1:21pm UTC](https://discourse.jupyter.org/t/location-of-libraries-or-extensions-installed-in-jupyterlab/16303/2 "2022-10-12T13:21:49Z")

</div>

`%pip` and `%conda` will always install in the same environment as the kernel that’s running. If that is the same environment as `jupyterlab`, the static files will be available when next loaded.

The shell `!pip` will install… wherever. It’s a bit hard to say, as it depends on how the kernel was installed, launched, etc.

No special handling exists to move files between python environments on different hosts, though “static files hosted by a kernel” have been long desired, and have lead some communities like `julia` to implement a “files-over-comms” approach (similar to how ipywidgets work).

Extensions that have a serverextension component would be particularly inconvenient, as these _always_ require a server restart.

For static files in `$PREFIX/share/jupyter/labextensions`, it would theoretically be possible to create a `jupyterlab_server_remoteextensions` that allowed for making these part of the same virtual file tree, but is unlikely to land in core.

`jupyterlab` is _designed_ to be less “hot swappable” in a running app than classic `notebook`, and doesn’t have a `require.js`-equivalent, and tools like [jupyterlab-plugin-playground](https://github.com/jupyterlab/jupyterlab-plugin-playground/) are needed to overcome some of this. It’s possible a future version will allow more dynamic plugin registration and de-registration, but this has many properties of a package manager.

---

<div class="post-metadata">

**Author:** ![JohnW-G2V](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/johnw-g2v/32/12279_2.png) [@JohnW-G2V](https://discourse.jupyter.org/u/JohnW-G2V)\
**Post date:** [February 1, 2024, 5:27am UTC](https://discourse.jupyter.org/t/location-of-libraries-or-extensions-installed-in-jupyterlab/16303/3 "2024-02-01T05:27:59Z")

</div>

^^^^ This!!  
As a noob, nervous to be arbitrarily hacking PATH yet in the face of many divergent cautions and recommendations, this does it.  
Lots of others seem challenged by installing and importing NumPy on JupyterLab. Same symptom as me. Problem was numpy clearly not installed in the correct place.  
Solution (as above): run “%pip install numpy” in a JupyterLab cell. No errors or warnings on where it was being installed. Import numpy runs without complaint.  
Beautiful. Thank you. I created an account just to post this.
