How to switch environment on Jupyter notebook for new notebook?

前端 未结 5 734
情书的邮戳
情书的邮戳 2021-02-06 12:20

I have an instance with various environment and some notebooks are compatible with different environment for e.g. notebook1 is for MXNet and notebook2 is for Tensorflow.

5条回答
  •  無奈伤痛
    2021-02-06 13:11

    I don't really know the definition and relationship between kernel and conda env, but I beleive we can set a kernel for each env.

    I got a problem similar to you: I clean my data in data_cleaning.ipynb under env_without_lgb. However, I have lightgbm installed under env_lightgbm. So, I want to switch kernel/env from env_without_lgb to env_lightgbm, which we can use Kernel -> Change Kernel:

    enter image description here

    If there is not a kernel you want, create a kernel under the right env according to this guide. For me, I only have a Pure Python 3 kernel and R kernel at first and then I create a kernel under env_lightgbm. At last, we can switch kernel when we editing our code.

    However, I still can not figure out the relationship between kernel and env.

提交回复
热议问题