Search code examples
pythonjupyter-notebookjupyterjupyterhub

In JupyterHub / notebook, is there a way to copy packages from one kernel to another kernel?


Does anyone know that, in JupyterHub / notebook, is there a way that I can copy packages / libraries from one kernel to another kernel?

It sounds odd, but in our environment, there is no internet connection (and rebuild a kernel is kind of pricy operation for us). However, in kernel A, it has some libraries that we want to use in kernel B. (both are python kernel, by the way, same python version).

Thanks!


Solution

  • Your kernel runs on python environment, you can just copy libraries from one environment to another environment. Example: Let's say your python packages are installed on the env target/env and you want to copy to another environment just copy the lib folder.

    cp -r target/env/lib/ target/test/lib/