How to switch environment on Jupyter notebook for new notebook?

前端 未结 5 668
情书的邮戳
情书的邮戳 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 12:55

    Installing the nb_conda_kernels package as suggested by user @jcb91 worked for me. I did have to install it both in my root (base) environment as well as the virtual environment with which I wanted to use it. To do this, run the following in the Anaconda prompt (in your base environment):

    conda install nb_conda_kernels
    

    Then, activate your virtual environment (in the code below named 'myenv') and install the nb_conda_kernels package there as well. You can do this by running in the Anaconda prompt:

    conda activate myenv
    conda install nb_conda_kernels
    

    You now should be able to switch to your different environment using:

    Kernel -> Change Kernel
    

提交回复
热议问题