##// END OF EJS Templates
update install instruction
Matthias Bussonnier -
Show More
@@ -1,51 +1,60 b''
1 .. _kernel_install:
1 .. _kernel_install:
2
2
3 Installing the IPython kernel
3 Installing the IPython kernel
4 =============================
4 =============================
5
5
6 IPython can be installed (different python versions, virtualenv or conda
6 IPython can be installed (different python versions, virtualenv or conda
7 environments) as a kernel for Jupyter by following these steps:
7 environments) as a kernel for Jupyter by following these steps:
8
8
9 * make sure that the desired python installation is active
9 * make sure that the desired python installation is active
10 (e.g. activate the environment, or use absolute paths)
10 (e.g. activate the environment, or use absolute paths)
11 and ipykernel is installed
11 and ipykernel is installed
12 * run once ``ipython kernel install --user``,
12 * run once ``ipython kernel install --user``,
13 or ``python -m ipykernel install --user`` to ensure a specific Python installation is used.
13 or ``python -m ipykernel install --user`` to ensure a specific Python installation is used.
14 * See `ipython kernel install --help` for the list of installation options like
15 naming the kernel, or non default install location.
16 * The IPython kernel for Jupyter is provided by the `ipykernel` python package,
17 see there if you need more flexibility for installation.
14
18
15
19
16 The last command installs a :ref:`kernel spec <jupyterclient:kernelspecs>` file for the current python installation. Kernel spec files are JSON files, which can be viewed and changed with a
20 The last command installs a :ref:`kernel spec <jupyterclient:kernelspecs>` file
17 normal text editor.
21 for the current python installation. Kernel spec files are JSON files, which
22 can be viewed and changed with a normal text editor.
18
23
19 For example:
24 For example:
20
25
21 .. sourcecode:: bash
26 .. sourcecode:: bash
22
27
23 source activate kernel-environment
28 source activate kernel-environment
24 ipython kernel install --user
29 ipython kernel install --user
25 source deactivate kernel-environment
30 source deactivate kernel-environment
26
31
27 or
32 or
28
33
29 .. sourcecode:: bash
34 .. sourcecode:: bash
30
35
31 ~/envs/kernel-environment/python -m ipykernel install --user
36 ~/envs/kernel-environment/python -m ipykernel install --user
32
37
38 .. note ::
39
40 The command `ipython kernelspec` is deprecated and will be removed in future versions.
41
33
42
34 .. _multiple_kernel_install:
43 .. _multiple_kernel_install:
35
44
36 Multiple IPython installs
45 Multiple IPython installs
37 =========================
46 =========================
38
47
39 If you want to have multiple IPython kernels for different environments,
48 If you want to have multiple IPython kernels for different environments,
40 you will need to specify unique names for the kernelspecs,
49 you will need to specify unique names for the kernelspecs,
41 and you may also want to specify the display name of those kernels,
50 and you may also want to specify the display name of those kernels,
42 so that you can clearly see which is which in the notebook menus:
51 so that you can clearly see which is which in the notebook menus:
43
52
44 .. sourcecode:: bash
53 .. sourcecode:: bash
45
54
46 source activate myenv
55 source activate myenv
47 ipython kernel install --user --name myenv --display-name "Python (myenv)"
56 ipython kernel install --user --name myenv --display-name "Python (myenv)"
48 source activate other-env
57 source activate other-env
49 ipython kernel install --user --name other-env --display-name "Python (other-env)"
58 ipython kernel install --user --name other-env --display-name "Python (other-env)"
50 source deactivate
59 source deactivate
51
60
General Comments 0
You need to be logged in to leave comments. Login now