There are a lot of questions related to this on SO, however all the answers appear not to work for me.
The problem:
I have a conda environment, called rideaux. I wish to access this enviroment from my jupyter notebooks. However, in jupyter notebooks the only kernel available is the default one.
To test, I tried to import packages that are available in the conda environment, but as expected this does not work in the available kernel.
What I tried:
As per related questions and answers (and more not listed here).
First, I tried to simply run the jupyter notebook server from inside the rideaux enviroment. This returns no change from the image above, i.e., the rideaux kernel is not available.
Next, I tried to use the
nb_conda_kernelspackage. I installedconda install -n notebook_env nb_conda_kernelsin my base environment and in my rideaux environment. I also installedipykernelin my rideaux environmentconda install ipykernel. Then, started a notebook server from the rideaux environment resulted in no change from the image above.I tried to register the conda environment by running
ipython kernel install --user --name=rideauxwhile inside the rideaux environment. This resulted in no change.
General information and troubleshooting.
Running which jupyter within the rideaux environment returns a executable from inside the environment.
Running jupyter kernelspec list returns the following. Here python3 appears to be the one seen in the image above. Then why does the rideaux kernel not show up?
Available kernels:
rideaux /home/mjpvanzuijlen/.local/share/jupyter/kernels/rideaux
python3 /home/mjpvanzuijlen/anaconda3/envs/rideaux/share/jupyter/kernels/python3
Running !jupyter-troubleshoot inside the notebook returns the output below. Nowhere does it mention the rideaux environment and the one returned by which jupyter is also not visible here. This might mean the wrong jupyter is being ran? I am not sure.
$PATH:
/snap/jupyter/6/bin
/snap/jupyter/6/usr/sbin
/snap/jupyter/6/usr/bin
/snap/jupyter/6/sbin
/snap/jupyter/6/bin
/home/mjpvanzuijlen/snap/jupyter/common/bin
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin
/usr/games
/usr/local/games
sys.path:
/snap/jupyter/6/bin
/snap/jupyter/6/lib/python37.zip
/snap/jupyter/6/lib/python3.7
/snap/jupyter/6/lib/python3.7/lib-dynload
/snap/jupyter/6/lib/python3.7/site-packages
sys.executable:
/snap/jupyter/6/bin/python3.7
sys.version:
3.7.3 | packaged by conda-forge | (default, Mar 27 2019, 23:01:00)
[GCC 7.3.0]
platform.platform():
Linux-4.15.0-140-generic-x86_64-with-glibc2.10
which -a jupyter:
/snap/jupyter/6/bin/jupyter
/snap/jupyter/6/bin/jupyter
