Page History
...
Making Your Own Conda Env Visible In Jupyter
If you build your own conda environment which contains a python jupyter kernel (package ipykernel) you can make it visible to the jupyter hub by creating a kernel spec file. For a user the spec files are located in ~/.local/share/jupyter/kernels/. The kernel.json is the one that contains which python to use and the name the kernel will be shown in Jupyter (display_name). For an example see ~wilko/.local/share/jupyter/kernels/example/.
An easy way to create the proper folder and spec files is to use the ipython command:
Code Block | ||
---|---|---|
| ||
% conda activate <your-env>% ipython kernel install --user --name "example" --display-name "A-example" |
Jupyter finds the user kernels in the directory ~/.local/share/jupyter/kernels/. To see how a kernel is setup look at the files in: /reg/g/psdm/sw/conda/jhub_config/prod-rhel7/kernels/. Wilko also has an example here: ~wilko/.local/shareshare/jupyter/kernels/tst1/
Virtualenv
...