Show More
@@ -206,6 +206,7 b" intersphinx_mapping = {'python': ('http://docs.python.org/2/', None)," | |||||
206 | 'traitlets': ('http://traitlets.readthedocs.org/en/latest/', None), |
|
206 | 'traitlets': ('http://traitlets.readthedocs.org/en/latest/', None), | |
207 | 'jupyterclient': ('http://jupyter-client.readthedocs.org/en/latest/', None), |
|
207 | 'jupyterclient': ('http://jupyter-client.readthedocs.org/en/latest/', None), | |
208 | 'ipyparallel': ('http://ipyparallel.readthedocs.org/en/latest/', None), |
|
208 | 'ipyparallel': ('http://ipyparallel.readthedocs.org/en/latest/', None), | |
|
209 | 'jupyter': ('http://jupyter.readthedocs.org/en/latest/', None), | |||
209 | } |
|
210 | } | |
210 |
|
211 | |||
211 | # Options for LaTeX output |
|
212 | # Options for LaTeX output |
@@ -3,37 +3,51 b'' | |||||
3 | Installing the IPython kernel |
|
3 | Installing the IPython kernel | |
4 | ============================= |
|
4 | ============================= | |
5 |
|
5 | |||
|
6 | .. seealso:: | |||
|
7 | ||||
|
8 | :ref:`Installing Jupyter <jupyter:install>` | |||
|
9 | The IPython kernel is the Python execution backend for Jupyter. | |||
|
10 | ||||
6 | The Jupyter Notebook and other frontends automatically ensure that the IPython kernel is available. |
|
11 | The Jupyter Notebook and other frontends automatically ensure that the IPython kernel is available. | |
7 | However, if you want to use a kernel with a different version of Python, or in a virtualenv or conda environment, |
|
12 | However, if you want to use a kernel with a different version of Python, or in a virtualenv or conda environment, | |
8 | you'll need to install that manually. |
|
13 | you'll need to install that manually. | |
9 |
|
14 | |||
10 | Using the Python version or environment for which you want to set up the kernel, run:: |
|
15 | Kernels for Python 2 and 3 | |
|
16 | -------------------------- | |||
|
17 | ||||
|
18 | If you're running Jupyter on Python 3, you can set up a Python 2 kernel like this:: | |||
|
19 | ||||
|
20 | python2 -m pip install ipykernel | |||
|
21 | python2 -m ipykernel install --user | |||
11 |
|
22 | |||
12 | pip install ipykernel # or: conda install ipykernel |
|
23 | Or using conda, create a Python 2 environment:: | |
|
24 | ||||
|
25 | conda create -n ipykernel_py2 python=2 ipykernel | |||
|
26 | source activate ipykernel_py2 # On Windows, remove the word 'source' | |||
13 |
|
|
27 | python -m ipykernel install --user | |
14 |
|
28 | |||
|
29 | If you're running Jupyter on Python 2 and want to set up a Python 3 kernel, | |||
|
30 | follow the same steps, replacing ``2`` with ``3``. | |||
|
31 | ||||
15 | The last command installs a :ref:`kernel spec <jupyterclient:kernelspecs>` file |
|
32 | The last command installs a :ref:`kernel spec <jupyterclient:kernelspecs>` file | |
16 | for the current python installation. Kernel spec files are JSON files, which |
|
33 | for the current python installation. Kernel spec files are JSON files, which | |
17 | can be viewed and changed with a normal text editor. |
|
34 | can be viewed and changed with a normal text editor. | |
18 |
|
35 | |||
19 | See `python -m ipykernel install --help` for the list of installation options like |
|
|||
20 | naming the kernel, or non default install location. |
|
|||
21 |
|
||||
22 | .. _multiple_kernel_install: |
|
36 | .. _multiple_kernel_install: | |
23 |
|
37 | |||
24 | Multiple IPython installations |
|
38 | Kernels for different environments | |
25 | ============================== |
|
39 | ---------------------------------- | |
26 |
|
40 | |||
27 | If you want to have multiple IPython kernels for different environments, |
|
41 | If you want to have multiple IPython kernels for different virtualenvs or conda environments, | |
28 |
you will need to specify unique names for the kernelspecs |
|
42 | you will need to specify unique names for the kernelspecs: | |
29 | and you may also want to specify the display name of those kernels, |
|
|||
30 | so that you can clearly see which is which in the notebook menus: |
|
|||
31 |
|
43 | |||
32 | .. sourcecode:: bash |
|
44 | .. sourcecode:: bash | |
33 |
|
45 | |||
34 | source activate myenv |
|
46 | source activate myenv | |
35 |
|
|
47 | python -m ipykernel install --user --name myenv --display-name "Python (myenv)" | |
36 | source activate other-env |
|
48 | source activate other-env | |
37 |
|
|
49 | python -m ipykernel install --user --name other-env --display-name "Python (other-env)" | |
38 | source deactivate |
|
|||
39 |
|
50 | |||
|
51 | The ``--name`` value is used by Jupyter internally. These commands will overwrite | |||
|
52 | any existing kernel with the same name. ``--display-name`` is what you see in | |||
|
53 | the notebook menus. |
General Comments 0
You need to be logged in to leave comments.
Login now