-
Notifications
You must be signed in to change notification settings - Fork 295
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
Cannot execute Python/Jupyter code - Need troubleshooting tool or guide. #5361
Comments
@chrisdias Using this same python environment can you just run something like a simple .py script in the terminal? This popped up in the log:
That looks like the python interpreter that you had selected on WSL might not be working at all. It's failing to just run |
And the Python Kernel is the same python3 |
I noticed ( There is still a problem where if I have the (I think) default |
So is that Python 3 (python) entry in the middle of your list the one that is still giving issues? Our kernel launching code should not actually install any kernel specs on a system. But it looks like there is a default kernel spec located there. Have you run Jupyter Notebook (classic or JupyterLab, not via VS Code) on this system? The kernel spec there is an invalid kernelspec and I'm interested in how it got installed. I can tell from the logging that it's located in the following spot.
The issue that you are seeing looks very similar to this: jupyter/notebook#2563 (comment) I'm not sure if we can totally fix this on our end. If there is an invalid kernelspec on a system then we won't be able to use it. However our messaging of the failure is terrible here. So at a minimum we should message better to the user what is happening here with the spawn failure. To fix it now though I think that you'd need to either edit the kernelspec to point at python3 or try the ipython command in that second link that I posted above. |
Yes, the one in the middle is the one that does not work and just hangs. Is the "kernel spec" the
I don't recall changing the kernel being pointed to, nor do I recall installing anything else besides Python in this WSL image (Ubuntu 20.04). It just stopped working. |
@chrisdias yeah, we list both python interpreter and installed kernelspecs on your system as possible kernels to use. That middle entry is a kernelspec that has been installed on your machine. Have you run jupyter from the command line on WSL? Running that installs a default kernel on the system without notification. That was my suspicion on where that spec came from. |
any idea how i might know if i ran jupyter from the command line? |
Is this WSL instance something that you have had around for a long time? Something like At this point the easiest thing might be to just delete that kernelspec. We can see if anything regenerates it. Regardless of how it got there we do still have an issue to fix on our side. Better messaging regarding the kernelspec failure at a minimum. Also in the specific case of |
ok i deleted it and i'll keep an eye out for changes. i feel like a diagnostic tool for the kernels might be helpful... Imagine you run a command Something like this (completely made up Status :) would have helped me pinpoint the problem, assuming you could run some sort of diagnostics against them.
|
@chrisdias Yeah that's a good suggestion. If a customer has an invalid kernelspec we wouldn't want to just hide it from them. As they would be annoyed as to why they didn't see it at all. But even before they try to launch we should be able to tell them that it's not valid. Instead of a status step we could maybe just flag it in the kernelspec quick pick with an error / warning icon of some type. And if they pick it pop up the info on why we can't launch it. We did have old code paths that would have installed a kernelspec, they shouldn't be hit, but if you do see that bad default kernelspec back just ping and we can dig in. |
Duplicate of #5291 |
Environment data
Can't run even a simple Python cell in Jupyter (native notebook)
Dev Tools Console:
Steps to reproduce:
run
buttonResults:
Logs
Output for
Jupyter
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toJupyter
)The text was updated successfully, but these errors were encountered: