Note

This documentation is for a development version of IPython. There may be significant differences from the latest stable release.

Installing the IPython kernel

IPython can be installed (different python versions, virtualenv or conda environments) as a kernel for Jupyter by following these steps:

  • make sure that the desired python installation is active (e.g. activate the environment, or use absolute paths) and ipykernel is installed
  • run once ipython kernel install --user, or python -m ipykernel install --user to ensure a specific Python installation is used.

The last command installs a kernel spec file for the current python installation. Kernel spec files are JSON files, which can be viewed and changed with a normal text editor.

For example:

source activate kernel-environment
ipython kernel install --user
source deactivate kernel-environment

or

~/envs/kernel-environment/python -m ipykernel install --user

Multiple IPython installs

If you want to have multiple IPython kernels for different environments, you will need to specify unique names for the kernelspecs, and you may also want to specify the display name of those kernels, so that you can clearly see which is which in the notebook menus:

source activate myenv
ipython kernel install --user --name myenv --display-name "Python (myenv)"
source activate other-env
ipython kernel install --user --name other-env --display-name "Python (other-env)"
source deactivate