Because none of the answers above worked for me, I write here the solution that finally solved my problem on Ubuntu. My problem was:
I did the following steps:
conda activate MyEnv
jupyter notebook
Although MyEnv
was active in the terminal and had an asterix when writing conda env list
, but jupyter notebook was started with the base environment.
Installing nb_conda
and ipykernel
didn't solve the problem for me either. Additionally, the conda
tab wasn't appearing in jupyter notebook and also clicking on the kernels or going to the menu Kernel->Change Kernel
didn't show the kernel MyEnv
.
Solution was: install the jupyter_environment_kernel in MyEnv
environment:
pip install environment_kernels
After that when starting jupyter notebook, it is started with the right environment. You can also switch between environments without stopping the kernel, by going to the menu Kernel->Change Kernel
and selecting the desired kernel.