Register a (python) notebook kernel:
Let's suppose you have created a conda environment named jupyter-env35
with conda create -n jupyter-env35 python=3.5
and now want to use it in jupyter.
Installing and registering a python kernel in the environment will make it available over the graphical notebook interface.
To do so, first install the ipython kernel:
conda install -n jupyter-env35 ipykernel
Then activate the environment and register the kernel:
source activate jupyter-env35
ipython kernel install --user --name jupyter-env35
When you now fire up juypter, it will show jupyter-env35
as a kernel in the list of available kernels. If you select it, all packages installed into juypter-env35
will be available.
Unregister a notebook kernel:
If you want delete the kernel from the notebook interface, jupyter --data-dir
, will print out jupyter's data directory.
Navigate to the printed folder, find the subfolder kernels
and delete the folder with the name of your kernel (here jupyter-env35
). After that the kernel will not show up in jupyter anymore.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…