-
Notifications
You must be signed in to change notification settings - Fork 297
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 launch other kernels if the user folder has a space in the path. #4647
Comments
Thanks for the bug. The .NET interactive kernel is provided by the .NET extension (at least the one you're showing in your screenshot). If it's not installed on both machines that would explain the discrepancy. The other items in your list look like jupyter installed kernels that the jupyter extension finds. Do you have the same kernels installed on both machines? You can check the problematic machine by typing 'jupyter kernelspec list' to see if jupyter finds them. |
From the working machine:
From the problematic machine:
|
Sorry the .NET kernel would be provided by the .NET extension (I missed that you said it was on both machines). If it's installed on both machines then I would log an issue against the .NET interactive extension. |
Yeah that sounds more like our fault. If the .NET kernels are installed we should be listing them AFAIK. There is some back and forth between us and the .NET team about who owns the kernels (eventually they should provide them) but with the version of our extension you have it should list them. Can you turn on verbose logging? This property in your settings.json "jupyter.logging.level": "debug" Then go to the Jupyter output tab and upload the contents as a file here? Thanks. That should show what we did to list the kernels. For example on my own machine with a similar setup to what you have, I get this in the output:
|
I wonder if it's because your user name has spaces in it. It looks like this is failing. At least it's not finding anything under this path:
If you start the Python 3.7 interpreter and then run this command, does it return an actual directory? import os
print(os.path.realpath("C:\\Users\\Jan Egil Ring\\AppData\\Roaming\\jupyter\\kernels")) |
Or the version of python. I know python 3.7 didn't deal with Windows file name redirects (your jupyter kernel directory may not actually be under your user folder) The bad machine seems to have a windows store version of python. An old one. You might try removing that version of python and reinstalling 3.9 from the windows store. |
Ah - I see. I have now uninstalled the 3.7 version from the windows store and installed the 3.9 version. Updated output when starting VS Code Insiders:
Now when running jupyter kernelspec list, the command is not found - so I suppose it is missing from the PATH |
You'll have to reinstall jupyter into the new 3.9 version. |
Forgot to state that I did so, but I re-ran it now:
It still seems to be missing from my PATH, so maybe I should add it manually? When going to the path manually and running jupyter kernelspec list I get this:
|
Okay so jupyter thinks you only have python3? If you rerun the .net installer does that let jupyter think it has .net kernels? |
I went ahead and uninstalled both .NET 3.1 and 5.0 SDKs and re-installed only the 5.0 version, as that should be sufficient according to the documentation. I then checked my PATH and noticed the 3.7 version`s path was listed. I removed that and added C:\Users\Jan Egil Ring\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts Then jupyter kernelspec list ran without issues:
Next I ran the following:
So far so good. Also, when checking in VS Code Insiders: However, when trying to execute a PowerShell-based cell:
|
It looks like it's running this command:
Is that command runnable from a plain command prompt? You may need to add something to your path. |
Yes:
|
Hmm, well it might be we're not creating the tmp file with the kernel data in it.
Does a python kernel work? |
Here is the content of a json-file created in the Temp-directory while trying to run a PowerShell cell:
Could it be the issue regarding spaces in the username which is biting? |
Ah yes. That's likely it. We're not quoting the parameters for non python kernels. Thanks for the help diagnosing :) |
Thank you for your patience - I would never have gotten this far without some assistance :) Are there any workarounds applicable? |
You'd have to rename your user (which I'm not sure is possible) |
I see...as I can use the other machine for now it is notso important that I want to do that at this point. However, is quoting the parameters something that might be added later on? If so, I can just wait and try again when that is implemented. |
Although it looks like we're passing the shortened version here:
So maybe .NET doesn't support the shortened version? If you run that exact command (assuming the json file is around still) does it work? |
It was not around, but I re-created the file using the content I pasted earlier.
I think it works - I suppose it is listening for requests. |
I found a workaround :) I created a symbolic link pointing to a path without spaces: I then launched VS Code Insiders using the symbolic link path: Happy days 😊 However, what do you think is the root cause of this? VS Code? dotnet interactive? jupyter? |
Good workaround idea 👍 If that workaround fixes it, it's our problem. We must not be quoting the arguments. |
You're using the insiders version. It doesn't currently have that feature yet. Should be soon though. |
Ah - thanks. |
Confirmed on Mac, but then again, having spaces in mac was not the issue. |
@rchiodo @joyceerhl . We have a windows only validation here. And David did the fix, so it might need to be one of you two for validation. |
Environment data
Expected behaviour
All installed kernels should be available
Actual behaviour
Only Python kernel available
Steps to reproduce:
I have two machines with a similar setup: Windows 10, VS Code Insiders and the Jupyter extension.
On one of them, I only see the Jupyter kernel in the Kernel selection dropdown:
On the other machine, I can see all:
For example the .NET Interactive extension is installed on both machines, but is missing on the problematic machine.
The text was updated successfully, but these errors were encountered: