Creating additional Python kernels

If you are working with different environments, you can create a variety of Python kernels that use different specifications and packages. Creating additional Python kernels is simple:

  1. First, you need to install IPython using the following command:
pip install ipython
  1. Next, install IPython kernel using the following command:
conda install ipykernel
  1. Finally, create a new kernel using the following command:
python -m ipykernel install --user --name base --display-name "New Kernel"

The preceding command tells IPython to install a new kernel, where you can specify the name of the environment and the display name for the kernel. In this example, our environment name is base and our kernel display name is "New Kernel"

When you open or refresh JupyterLab, you will be able to see the new kernel under the Notebook section in the main work area, as shown here:

The kernel will be labeled with the name you specified as the display name.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.48.131