When starting hydrogen in atom to execute python code, I usually get asked which kernel I want to use. I have three kernels. The one I use on my current project is the standard python3 kernel, where I have all the required libraries installed.
Today, when I tried to run some code, this kernel was not in the list. The two other environments (created with conda, I think) were still detected by Hydrogen.
I ran $ jupyter kernelspec list
in my terminal (on macOS), and I got this :
env1 /Users/me/Library/Jupyter/kernels/env1
env2 /Users/me/Library/Jupyter/kernels/env2
python3 /Applications/anaconda3/share/jupyter/kernels/python3
I have no idea what caused Hydrogen to stop detecting the python3 kernel.
Restarting atom did not solve this.
How can I make Hydrogen detect the python3 kernel? Any idea of what could have happened?
My hypothesis was that the problem had something to do with the python3 kernel no being in the same directory as the two still-detected kernels.
I created a symbolic link to python3
in the directory of env1
and env2
in Terminal:
cd /Users/me/Library/Jupyter/kernels
ln -s /Applications/anaconda3/share/jupyter/kernels/python3
I then restarted atom, and it now works as previously.
However, I don't know what caused the problem, and I'm not even entirely sure it is this symbolic link that solved it.
Note : when doing jupyter kernelspec list
, the python3 kernel is now listed under the /Users/me/Library/Jupyter/kernels
directory.