Kernels for different environments
If you want to have multiple IPython kernels for different virtualenvs or conda environments, you will need to specify unique names for the kernelspecs.
Make sure you have ipykernel installed in your environment. If you are using pip
to install ipykernel
in a conda env, make sure pip
is installed:
source activate myenv conda install pip conda install ipykernel # or pip install ipykernel
For example, using conda environments, install a Python (myenv)
Kernel in a first environment:
source activate myenv python -m ipykernel install --user --name myenv --display-name "Python (myenv)"
And in a second environment, after making sure ipykernel is installed in it:
source activate other-env python -m ipykernel install --user --name other-env --display-name "Python (other-env)"
The --name
value is used by Jupyter internally. These commands will overwrite any existing kernel with the same name. --display-name
is what you see in the notebook menus.