What does `nb_conda_kernels` do?
See original GitHub issuenb_conda_kernels
got added to my Anaconda installation on an update a few months back. Since then I’ve been confused as to what it does - it seems to make sharing Notebooks harder. What am I missing?
Here’s my workflow:
- Create a new environment for a project using
conda
- Make some Notebooks, commit to git, share to collaborator
- Collaborator makes a similar environment, clones my repo
- Using an activated environment the collaborator, having the same named project environment, is asked to select an environment (and presumably this changes the metadata for the Notebook)
I don’t understand why this just doesn’t use the default environment that jupyter notebook
was run from. What’s the advantage to me of activating an environment, starting a Notebook, then having to choose the same environment (and/or having a collaborator mess with the metadata when we’re sharing Notebooks)?
What’s the thinking behind fixing a Notebook to a (edit - removed “machine”) specific environment name?
Update - I’ve now upgraded to 2.0 (which still required me to choose a kernel when I started a Notebook), I see on the installation page that I could also run
python -m nb_conda_kernels.install --enable --prefix="%CONDA_PREFIX"
which I’ve done because it looks magic, but not because I know what it’ll fix.
For reference the Notebook metadata in this case contains:
"kernelspec": {
"name": "conda-env-fds-py",
"display_name": "Python [conda env:fds]",
"language": "python"
},```
Hoping someone can set me straight...
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (4 by maintainers)
Top GitHub Comments
[note: most of this information is based on my usage of the environment_kernel_manager which more or less has the same idea as nb_conda_kernels]
The kernel isn’t specific to the machine, it uses a name defined by the conda environment name: in this case the nb_conda_kernels creates a (virtual) kernel spec for each conda environment (which has a kernel installed?). So if you both have nb_conda_kernels installed and the same name for the projects conda environment, it should work.
Just to comment on the idea for a newish workflow:
jupyter.exe
or whatever it is called on mac/linux)The “default name” is actually depended on having a jupyter kernel in the same environment as the jupyter notebook, which does not need to be the case (at least I tried to remove it, but conda didn’t let me, bu AFAIK there shouldn’t be a technical reason other than not confusing the user).
Closing this one since the original discussion stopped a long time ago. Please reopen (or open a new issues) if you have further questions.