-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jupyter Server: No Kernel Python: Not Started #1128
Comments
Thanks for the bug. Are you running VS code as the same user as yourself? Seems odd that we wouldn't be able to write to your users folder. |
Yes, looks strange. I am running it as the same user as myself, and I don't know how to use another user. |
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?
|
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. |
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. |
@rchiodo thanks for the help so far. I read through the whole issue but I am confused/unsure what "fix" you are referring to. Do you mind telling me what the instructions are or what you are referring to? |
I also encountered the same problem, the webpage could not be opened, how to solve this problem, thanks. |
This issue is a problem with VS code writing to the There is another problem where if conda doesn't get activated, you can't run any jupyter code. There's multiple issues related to that: @brando90 I believe your problem was entirely to do with conda not being setup right. I believe? @DonJayamanne helped you out in the comments for microsoft/vscode-python#9105 @weijew I'm not sure what your problem is. What webpage could not be opened? |
sort of. I used the same But yes, for now we found a solution to it. |
Thanks for your answer, I solved the problem. Something went wrong with my conda activation |
@rchiodo Even with the hints in this thread so far, I'm unable to resolve the issue. Still getting
The first is probably unrelated but the second seems to suggest that it's looking for a kernel in an old deleted conda environment. I looked in
and replaced all mentions of |
@janosh what does |
@rchiodo This is what I get
|
@janosh can you attach your console log? That should list out where we're finding the oldenv from. |
@rchiodo Sure thing: |
@janosh that doesn't look like the entire log. Did you apply a filter? That looks like only the errors. |
@rchiodo Ah sorry, I thought we only cared about the errors. Here's the full log. |
What does |
@rchiodo
The env shown in the status bar is |
Hmm. @DonJayamanne do we cache the environments somewhere? This is on a linux machine so it's not in the registry. Where would the 'oldenv' environment come from if not from conda info --envs? |
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:
|
Yes it's cached in the memento.
|
@DonJayamanne Cool! I didn't know about this command. I just selected 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. |
@DonJayamanne maybe we have a bug in our 'working jupyter' cache? That if it doesn't work, we don't search elsewhere? |
Oh and thanks @janosh |
@rchiodo No problem and thanks for your help! |
Hi @bigrat911 in my case I had similar issue with Jupyter server and it worked well by doing: Basically I changed the server and worked well. Hope this will be helpfull. |
Pretty sure this is the right log file. Only log file I ever made that I cut into another file to edit out identifiers. If we add up what you just said and what I claimed earlier that the log said it was not using the right remote port they work out to this: Is there a way to clean anything that might be cached anywhere? Incidently I had another data point that points to stale info. When I noticed the remote log was ignoring the port I put into the vscode UI remote URL, I went and set up a jupyter server at the port vscode-python was actually logging as using. That started logging events on the jupyter side but the jupyter server said vscode-python was using bad URLs. |
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). |
The newer version is my actual install in applications. I did the uninstall/restart of vscode-python. This what is in my User settings json looks like {
"telemetry.enableTelemetry": false,
"workbench.colorTheme": "Default Light+",
"python.linting.pylintCategorySeverity.convention": "Warning",
"python.linting.pylintCategorySeverity.error": "Error",
"python.linting.mypyCategorySeverity.note": "Warning",
"python.linting.pycodestyleCategorySeverity.W": "Error",
"workbench.colorCustomizations": {
"activityBar.background": "#00AA00",
"editorError.foreground": "#ff0000",
"editorError.border": "#ff0000",
"editorWarning.foreground": "#e49638"
},
"python.linting.pylintCategorySeverity.refactor": "Error",
"files.autoSaveDelay": 100,
"files.autoSave": "afterDelay",
"editor.tabCompletion": "on",
"editor.detectIndentation": false,
"editor.formatOnPaste": false,
"terminal.integrated.scrollback": 10000,
"editor.useTabStops": false,
"terminal.external.osxExec": "/bin/bash",
"terminal.integrated.shell.osx": "/bin/bash",
"terminal.integrated.shellArgs.osx": ["-l"],
"terminal.explorerKind": "integrated",
"workbench.iconTheme": "material-icon-theme",
"python.linting.pylintUseMinimalCheckers": false,
"python.analysis.diagnosticPublishDelay": 10,
"python.linting.pylintCategorySeverity.warning": "Error",
"python.linting.pylintArgs": [
"--disable=using-constant-test,logging-not-lazy,invalid-name,trailing-whitespace,mixed-indentation,bad-whitespace,line-too-long,redefined-outer-name"
],
"editor.renderWhitespace": "all",
"editor.trimAutoWhitespace": false,
"python.dataScience.sendSelectionToInteractiveWindow": true,
"terminal.integrated.env.osx": {
"PATH": ""
},
"terminal.integrated.inheritEnv": false,
"window.zoomLevel": -1,
"workbench.tree.indent": 30,
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"python.jediEnabled": false,
"terminal.integrated.rendererType": "experimentalWebgl",
"r.bracketedPaste": false,
"python.condaPath":"/Users/USERNAME/anaconda3/condabin/conda"
} It occurs to me I don't know how that json file stays up to date as new versions of things roll in. That particular one user settings.json is over a year old now. |
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: {
"python.pythonPath": "/Users/USERNAME/anaconda3/envs/m2/bin/python",
"python.dataScience.jupyterServerURI": "http://localhost:8889/?token=7f88c4411629ad42dc415750c8546ef525852090b2f6050b"
} I deleted the python.dataScience.jupyterServerURI line, restarted and vscode-python took over from there and "local" works again. |
Same issue, but with a solution. I am on
The proximate cause of the problem was an attempt to install a new library (actually pysyft). As far as I can see, this pysyft installation messed up some of the Jupyter dependencies, specificaly messing up the version of tornado (pysyft requires one version, Jupyter requires another, etc). Here is what solved it for me:
After that everything ran as supposed to (except pysyft, which no longer has the version that it needs). I hope this helps others. It seems the basic issue is - as you install new things - version dependencies may be different for different projects. Advice to the vscode-python team: Cheers! |
I removed the conda path option and that worked |
similar to @jrounds solutions, commenting out my However, for me, the issue came when I started to used the new Settings Sync extension which I believe in the process mess up some file paths in the settings between devices. It's a useful extension when commonly switching between devices but it doesn't come without pain. |
Is anyone still running into these issues in the latest version of VS Code & Jupyter extension? |
@DonJayamanne Nope. |
@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 #7901 I'm going to close this for now, thanks again |
No complaints from me. Everything Python-related in VS Code been running very smoothly for a while now. Thanks for all your work! 👍 |
Bug: Notebook Editor, Interactive Window, Editor cells
Steps to cause the bug to occur
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
Developer Tools Console Output
Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer
The text was updated successfully, but these errors were encountered: