I have 2 conda environments installed:
- env1
: base environment where jupyter-notebook is installed and started from
- env2
: project environment with ipykernel installed
I manually added kernelspecs for the 2 environments following this guide.
Everything works fine. sys.executable
in 2 kernels show separate, correct paths. But for terminal commands (i.e. !which python
), no matter which kernel I'm running in the environment defaults to env1
.
Is there any way to have the notebook automatically change this to the kernel's environment?
P.S. I already tried installing nb_conda, nb_conda_kernels