Show More
@@ -1,51 +1,60 b'' | |||
|
1 | 1 | .. _kernel_install: |
|
2 | 2 | |
|
3 | 3 | Installing the IPython kernel |
|
4 | 4 | ============================= |
|
5 | 5 | |
|
6 | 6 | IPython can be installed (different python versions, virtualenv or conda |
|
7 | 7 | environments) as a kernel for Jupyter by following these steps: |
|
8 | 8 | |
|
9 | 9 | * make sure that the desired python installation is active |
|
10 | 10 | (e.g. activate the environment, or use absolute paths) |
|
11 | 11 | and ipykernel is installed |
|
12 | 12 | * run once ``ipython kernel install --user``, |
|
13 | 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 | |
|
17 | normal text editor. | |
|
20 | The last command installs a :ref:`kernel spec <jupyterclient:kernelspecs>` file | |
|
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 | 24 | For example: |
|
20 | 25 | |
|
21 | 26 | .. sourcecode:: bash |
|
22 | 27 | |
|
23 | 28 | source activate kernel-environment |
|
24 | 29 | ipython kernel install --user |
|
25 | 30 | source deactivate kernel-environment |
|
26 | 31 | |
|
27 | 32 | or |
|
28 | 33 | |
|
29 | 34 | .. sourcecode:: bash |
|
30 | 35 | |
|
31 | 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 | 43 | .. _multiple_kernel_install: |
|
35 | 44 | |
|
36 | 45 | Multiple IPython installs |
|
37 | 46 | ========================= |
|
38 | 47 | |
|
39 | 48 | If you want to have multiple IPython kernels for different environments, |
|
40 | 49 | you will need to specify unique names for the kernelspecs, |
|
41 | 50 | and you may also want to specify the display name of those kernels, |
|
42 | 51 | so that you can clearly see which is which in the notebook menus: |
|
43 | 52 | |
|
44 | 53 | .. sourcecode:: bash |
|
45 | 54 | |
|
46 | 55 | source activate myenv |
|
47 | 56 | ipython kernel install --user --name myenv --display-name "Python (myenv)" |
|
48 | 57 | source activate other-env |
|
49 | 58 | ipython kernel install --user --name other-env --display-name "Python (other-env)" |
|
50 | 59 | source deactivate |
|
51 | 60 |
General Comments 0
You need to be logged in to leave comments.
Login now