anaconda/nb_conda_kernels

Using Jupyterlab with nb_conda_kernels and prebuilt extensions

Closed this issue · 3 comments

Problem

I use virtual environments (via conda) to manage the Python packages I have installed for different projects. I have a separate JupyterLab environment, and use nb_conda_kernels to work with my project kernels and avoid installing jupyterlab once per project. This worked really well with the old JupyterLab extension architecture since I could just install all extensions in my jupyterlab environment. With prebuilt extensions, I need to install the Python package both in the project's environment and then also in the Juupyterlab environment. This makes my jupyterlab environment rather cluttered and I need to make sure I keep packages in both locations up to date.

I still have some "global" jupyterlab extensions that I want to be able to use with any project environment (vim-bindings, spellchecker, etc), so it is not preferable to install JupyterLab in each project's environment, as that would involve installing the same extensions multiple time and keep them updated for each project separately.

Proposed Solution

Is there any way that nb_conda_kernels could register prebuilt extensions from virtual environments and make them available to use in JupyterLab depending on which kernel a notebook is running? Or is there another workaround that I am missing for the workflow I am describing with using one JupyterLab environment with multiple project environments/kernels?

Package versions
nb_conda_kernels          2.3

IPython          : 7.28.0
ipykernel        : 6.4.1
ipywidgets       : 7.6.5
jupyter_client   : 7.0.6
jupyter_core     : 4.8.1
jupyter_server   : 1.13.4
jupyterlab       : 3.2.8
nbclient         : 0.5.4
nbconvert        : 6.2.0
nbformat         : 5.1.3
notebook         : 6.4.4
qtconsole        : 5.1.1
traitlets        : 5.1.0

Cross-posted jupyterlab/jupyterlab#11964

@joelostblom Do you have any new insight on this after a year?

I'm afraid this is well out of scope for nb_conda_kernels, at least not without a specific implementation suggestion and a volunteer developer. I'm not even sure, honestly, if it is a practically fixable problem.

I'm going to close this one for now, but if there is progress on jupyterlab/jupyterlab#11964 we can certainly try to align. They're much better equipped to even consider this over there.