Reputation: 1904
I'm working on Ubuntu
by remoteSSH
, and I updated python kernel in my vitual environment named nn
form 3.7.9
to 3.8.5
, however, I still find the old kernel standing in the jupyter kernel list. I want to know how to delete the old kernel name from the kernel list.
I've replaced python 3.7.9
and python3.6.4
with python 3.8.5
, but the old kernels didn't disappear, I want to delete them manually.
Moreover, I can't select Python 3.8.5
from the kernel list.
Upvotes: 6
Views: 9633
Reputation: 1276
Here's a workaround: in the command palette, search for Python: Select interpreter
. You then get a dropdown with a little refresh button in the top right corner. After you refresh this list the new interpreter will be listed as a kernel for jupyter.
Upvotes: 2
Reputation: 111
I had the same problem and the following might help someone else encountering the issue:
Reload VS Code Window by Ctrl+Shift+P and selecting Reload Window
.
Reload the Python and Jupyter extensions under the Extensions
in the Side Bar.
Quit and relaunch VS Code.
It seems that VS Code is not that quick to update the interpreter list.
Upvotes: 10
Reputation: 3087
It looks like you have fixed your issue already. But in case anyone else hits this, or a similar issue. VS Code jupyter support looks in the standard jupyter locations for any installed kernelspecs you can see those directories listed here: https://jupyter.readthedocs.io/en/latest/use/jupyter-directories.html#data-files
VS Code should pick up anything that Jupyter could pick up. So if you happen to have jupyter installed in a python environment then from the commandline you can run jupyter kernelspec list
to see a list of all the kernelspecs installed on the system.
Upvotes: 0
Reputation: 1904
Ok I figured it out. There are kernel register files in the directorry
.local/jupyter/kernels/pythonxxxx
I manually delete python379
and python364
then everything is totally right.
Upvotes: 0