简体   繁体   English

在 JupyterHub / notebook 中,有没有办法将包从一个 kernel 复制到另一个 kernel?

[英]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?有谁知道,在 JupyterHub / notebook 中,有没有办法可以将包 / 库从一个 kernel 复制到另一个 kernel?

It sounds odd, but in our environment, there is no internet connection (and rebuild a kernel is kind of pricy operation for us).这听起来很奇怪,但在我们的环境中,没有互联网连接(重建 kernel 对我们来说是一种昂贵的操作)。 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). 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!谢谢!

Your kernel runs on python environment, you can just copy libraries from one environment to another environment.您的 kernel 在 python 环境中运行,您只需将库从一个环境复制到另一个环境。 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.示例:假设您的 python 软件包安装在 env 目标/env 上,您想复制到另一个环境只需复制 lib 文件夹。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM