Show More
@@ -53,3 +53,28 b' For example, using conda environments:' | |||||
53 | The ``--name`` value is used by Jupyter internally. These commands will overwrite |
|
53 | The ``--name`` value is used by Jupyter internally. These commands will overwrite | |
54 | any existing kernel with the same name. ``--display-name`` is what you see in |
|
54 | any existing kernel with the same name. ``--display-name`` is what you see in | |
55 | the notebook menus. |
|
55 | the notebook menus. | |
|
56 | ||||
|
57 | Using virtualenv or conda envs, you can make your IPython kernel in one env available to Jupyter in a different env. To do so, run ipykernel install from the kernel's env, with --prefix pointing to the Jupyter env: | |||
|
58 | ||||
|
59 | .. sourcecode:: bash | |||
|
60 | ||||
|
61 | /path/to/kernel/env/bin/python -m ipykernel install --prefix=/path/to/jupyter/env --name 'python-my-env' | |||
|
62 | ||||
|
63 | Note that this command will create a new configuration for the kernel in one of the prefered location (see ``jupyter --paths`` command for more details): | |||
|
64 | ||||
|
65 | * system-wide (e.g. /usr/local/share), | |||
|
66 | * in Jupyter's env (sys.prefix/share), | |||
|
67 | * per-user (~/.local/share or ~/Library/share) | |||
|
68 | ||||
|
69 | If you want to edit the kernelspec before installing it, you can do so in two steps. | |||
|
70 | First, ask IPython to write its spec to a temporary location: | |||
|
71 | ||||
|
72 | .. sourcecode:: bash | |||
|
73 | ||||
|
74 | ipython kernel install --prefix /tmp | |||
|
75 | ||||
|
76 | edit the files in /tmp/share/jupyter/kernels/python3 to your liking, then when you are ready, tell Jupyter to install it (this will copy the files into a place Jupyter will look): | |||
|
77 | ||||
|
78 | .. sourcecode:: bash | |||
|
79 | ||||
|
80 | jupyter kernelspec install /tmp/share/jupyter/kernels/python3 |
General Comments 0
You need to be logged in to leave comments.
Login now