i'm using jupyter lab, and i'm having trouble to add conda environment. The idea is to launch jupyter lab from my base environnment, and then to be able to choose my other conda envs as kernels.
I installed the package nb_conda_kernels which is supposed to do just that, but it's not working as I want. Indeed, let's assume I create a new conda environment, then i launch jupyter lab from base, I can't see the new environment as an available kernel.
I have found a "fix", which works everytime but is not convenient at all. If I install jupyter notebook in my new environment, then launch a jupyter notebook from this new environment, close it, go back to base environment, and then launch jupyter lab from base environment, my new environment is available as a kernel in jupyter lab.
If you know how to make it work without this "fix", i would be very grateful.
A solution using
nb_conda_kernels
. First, install it in your base environment :Then in order to get a kernel for the conda_env
cenv
:You will get a new kernel named
Python [conda env:cenv]
in your next run ofjupyter lab
/jupyter notebook
Assuming your conda-env is named
cenv
, it is as simple as :If you restart your jupyter notebook/lab you will be able to see the new kernel available.
PS: If you are using virtualenv etc. the above steps hold good.