vscode-jupyter: Jupyter Server: No Kernel Python: Not Started
Bug: Notebook Editor, Interactive Window, Editor cells
Steps to cause the bug to occur
- Open VS Code
- Cmd+Shift+P, Creat New Jupyter
Actual behavior
Jupyter Server: No Kernel
Python: Not Started
Error: [Errno 13] Permission denied: ‘/Users/XXXXX/Library/Jupyter/kernels/python37364bitbasecondac02285ab1a5b43e69345d43980645608’
Perhaps you want
sudo
or --user
?
Expected behavior
Jupyter Server worked well
Your Jupyter and/or Python environment
Please provide as much info as you readily know
- Jupyter server running: Local
- Extension version: 2020.1.58038-xxx
- VS Code version: 1.41.1
- Setting python.jediEnabled: true
- Python and/or Anaconda version: 3.7.3
- OS: Mac
- Virtual environment: conda
Developer Tools Console Output
Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 26
- Comments: 76 (37 by maintainers)
https://www.reddit.com/r/vscode/comments/eq2bfv/vs_code_jupyter_server_no_kernel_python_not/
For some reason this fixed the issue for me - hopefully it’s helpful.
Yes it’s cached in the memento. @janosh
Jupyter
output panel and let us know what’s in there?Select Jupyter Interpreter..
and let us know what currently selected, should be displayed in the picker input as a placeholder. Please select an interpreter that you’d like to use for Jupyter from this list.It should have that status before you run any cells, but then it should register the kernel. It looks like it’s not able to write to the user location on disk.
Does that place actually exist? Is this location writable by you?
Making sure that VS Code setting
"python.condaPath": "C:\\Program Files\\miniconda3\\Scripts\\conda.exe"
is pointing to the correct directory solved it for me
In case it helps to pinpoint the issue, if I try to execute a cell in a blank Jupyter notebook (rather than in the interactive window), I get the error:
Fixed it.
Your comments got me thinking about settings so I started sniffing around .vscode folders.
Inside my project directory was a settings.json as:
I deleted the python.dataScience.jupyterServerURI line, restarted and vscode-python took over from there and “local” works again.
Hi @bigrat911 in my case I had similar issue with Jupyter server and it worked well by doing: 1º Start new .ipynd notebook in Vs 2º Ctrl+shift + P >> Python: Specify local or remote server for connections 3º Default 4º Run some code.
Basically I changed the server and worked well.
Hope this will be helpfull.
@janosh thanks for getting back, sorry this didn’t get much attention, we’ve been regularly working on kernel related issues and I’d like to ensure we have a great handle on all of those issues and I’m trying to clean them up. You can see that here https://github.com/microsoft/vscode-jupyter/issues/7901
I’m going to close this for now, thanks again
@DonJayamanne Nope.
Hmm. Well you might start with updating VS code. It’s a bit out of date (should be on 1.45.1 right now).
Then uninstall and reinstall the python extension (reloading VS code in between each). Not sure how the setting would be coming out wrong. You can check the settings.json too (the UI should just be reading the settings.json, which is what we read to get the setting).
I have same problem. I solved it by change from Anaconda3 4.2.0(python 3.5) to Anaconda3 python 3.7. Try more: Launch Visual Code from Anaconda Navigator. Select Interpreter. It’s worked.
This bug might be related to this: https://discourse.jupyter.org/t/jupyter-core-4-6-2-release-with-insure-mode-option/3300
You could try setting the JUPYTER_ALLOW_INSECURE_WRITES variable globally (or in whatever you start VS code from) to see if the problem goes away
@DonJayamanne Cool! I didn’t know about this command. I just selected
newenv
in the resulting dropdown and all is back to working! Thanks a lot! 👍Are you still interested in the Jupyter output? I’m afraid I can’t reproduce the issue now since I can’t reselect the old deleted env that was apparently cached somewhere.
I did upload the full logs above.
It’s supposed to say no server/no kernel until you run. That’s by design. That’s not the issue @bigrat911 is seeing though. When @bigrat911 runs a cell, it still doesn’t work because we can’t write the kernel.json file to their user directory.