I don't want to install Jupyter Lab in every Conda Environment

I recently installed Miniconda on Ubuntu within WSL 2, which created a base environment where I installed JupyterLab. Consequently, I can only access the dependencies of the base environment. How can I work in a different conda environment without having to install JupyterLab in every environment, as it’s a platform/IDE rather than a dependency for me?

1 Like

Hello,

Take a look at the nb_conda_kernels extension:

From the repo’s README:

This extension enables a Jupyter Notebook or JupyterLab application in one conda environment to access kernels for Python, R, and other languages found in other environments.

The README also describes to install and use this extension, but here’s a quick summary:

  • Install nb_conda_kernels in the same environment as JupyterLab, in your case, you installed it in base
  • Create new conda environments with your desired packages, but also include the ipykernel package (if using Python)
  • Your conda environments should be accessible via JupyterLab

Best,

ana

3 Likes