Skip to content
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

Closed
janegilring opened this issue Feb 4, 2021 · 34 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug notebook-execution Kernels issues (start/restart/switch/execution, install ipykernel)

Comments

@janegilring
Copy link

Environment data

  • VS Code version: 1.53.0-insider
  • Jupyter Extension version: v2020.12.414227025
  • Python Extension version : v2021.1.502429796
  • OS (Windows | Mac | Linux distro) and version: Windows 10, build 10.0.19041.610
  • Python and/or Anaconda version: Python 3.7.9
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Jupyter server running: Local

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:
image

On the other machine, I can see all:
image

For example the .NET Interactive extension is installed on both machines, but is missing on the problematic machine.

@janegilring janegilring added the bug Issue identified by VS Code Team member as probable bug label Feb 4, 2021
@rchiodo
Copy link
Contributor

rchiodo commented Feb 4, 2021

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.

@rchiodo rchiodo added info-needed Issue requires more information from poster notebook-execution Kernels issues (start/restart/switch/execution, install ipykernel) kernel-enumeration labels Feb 4, 2021
@janegilring
Copy link
Author

From the working machine:

jupyter kernelspec list
Available kernels:
  powershell       C:\Users\janring\AppData\Roaming\jupyter\kernels\powershell
  pysparkkernel    C:\Users\janring\AppData\Roaming\jupyter\kernels\pysparkkernel
  sparkkernel      C:\Users\janring\AppData\Roaming\jupyter\kernels\sparkkernel
  sparkrkernel     C:\Users\janring\AppData\Roaming\jupyter\kernels\sparkrkernel
  python3          C:\Users\janring\AppData\Local\Continuum\anaconda3\share\jupyter\kernels\python3

From the problematic machine:

jupyter kernelspec list
Available kernels:
  python3    C:\Users\Jan Egil Ring\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\ipykernel\resources

@rchiodo
Copy link
Contributor

rchiodo commented Feb 4, 2021

That looks like it's behaving as expected then.

This kernel matches the kernel that was installed by jupyter
image

The other one must be for your global python interpreter.

@rchiodo rchiodo closed this as completed Feb 4, 2021
@rchiodo
Copy link
Contributor

rchiodo commented Feb 4, 2021

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.

@janegilring
Copy link
Author

I see - this might be just missing pre-requisites on my side as I`m rather new to Jupyter Notebooks and I thought installing the VS Code extensions would install (or prompt for) everything needed.

However, I realized now that I probably need to install the .NET SDK so I started off with installing dotnet-sdk-5.0.102-win-x64.exe.

After doing so I tried to install the .NET Interactive Jupyter kernel:

dotnet interactive jupyter install
It was not possible to find any compatible framework version
The framework 'Microsoft.AspNetCore.App', version '3.1.0' was not found.
  - The following frameworks were found:
      5.0.2 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]

You can resolve the problem by installing the specified framework and/or SDK.

The specified framework can be found at:
  - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=3.1.0&arch=x64&rid=win10-x64

I found it strange that it is not available in the latest version, but anyway I went ahead and installed the recommended version (dotnet-sdk-3.1.405-win-x64.exe).

After that I re-ran the installation of the kernel:

dotnet interactive jupyter install

Welcome to .NET Interactive!
---------------------
Telemetry
---------
The .NET Core tools collect usage data in order to help us improve your experience.The data is anonymous and doesn't include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_TRY_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.

Installing using jupyter kernelspec module.
Installed ".NET (C#)" kernel.
Installing using jupyter kernelspec module.
Installed ".NET (F#)" kernel.
Installing using jupyter kernelspec module.
Installed ".NET (PowerShell)" kernel.

After that it was listed in the output of jupyter kernelspec list:

jupyter kernelspec list
Available kernels:
  python3            C:\Users\Jan Egil Ring\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\ipykernel\resources
  .net-csharp        C:\Users\Jan Egil Ring\AppData\Roaming\jupyter\kernels\.net-csharp
  .net-fsharp        C:\Users\Jan Egil Ring\AppData\Roaming\jupyter\kernels\.net-fsharp
  .net-powershell    C:\Users\Jan Egil Ring\AppData\Roaming\jupyter\kernels\.net-powershell

However, it still does not show up within VS Code Insiders (I have re-launched VS Code Insiders after installing all of the above):
image

@rchiodo rchiodo reopened this Feb 4, 2021
@rchiodo
Copy link
Contributor

rchiodo commented Feb 4, 2021

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:

9576 Info 2021-02-04 09:53:17: Loading kernelspec from C:\Users\Rich\miniconda3\envs\python38_conda\share\jupyter\kernels\python3\kernel.json for undefined
9576 Info 2021-02-04 09:53:17: Loading kernelspec from D:\Source\JupyterKernels\kernels\python3\kernel.json for undefined
9576 Warn 2021-02-04 09:53:17: Multiple kernels with the same name. Defaulting to first kernel. Unable to find the kernelspec with the display name 'Python 3.8.5 64-bit'
9576 Info 2021-02-04 09:53:17: Find kernel spec, Class name = D, completed in 852ms, has a truthy return value, Arg 1: <Uri:d:\Source\Testing_5\deathRates.ipynb>, Arg 2: {"kernelspec":{"display_name":"Python 3.8.5 64-bit","metadata":{"interpreter":{"hash":"aac29dc6f1f2ff3e256c48b290d17f03f149bf0afb7ce7956f8dd521ce9388d4"}},"name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.8.5"},"orig_nbformat":2}, Arg 3: {"_isCancelled":false,"_emitter":null}, Return Value: {"specFile":"C:\\Users\\Rich\\miniconda3\\envs\\python38_conda\\share\\jupyter\\kernels\\python3\\kernel.json","name":"python3","argv":["C:/Users/Rich/miniconda3/envs/python38_conda\\python.exe","-m","ipykernel_launcher","-f","{connection_file}"],"language":"python","path":"C:/Users/Rich/miniconda3/envs/python38_conda\\python.exe","display_name":"Python 3"}
9576 Info 2021-02-04 09:53:17: Loading kernelspec from C:\Users\Rich\AppData\Roaming\jupyter\kernels\.net-csharp\kernel.json for undefined
9576 Info 2021-02-04 09:53:17: Loading kernelspec from C:\Users\Rich\AppData\Roaming\jupyter\kernels\.net-fsharp\kernel.json for undefined
9576 Info 2021-02-04 09:53:17: Loading kernelspec from C:\Users\Rich\AppData\Roaming\jupyter\kernels\.net-powershell\kernel.json for undefined
9576 Info 2021-02-04 09:53:17: Loading kernelspec from C:\Users\Rich\AppData\Roaming\jupyter\kernels\julia-1.5\kernel.json for undefined
9576 Info 2021-02-04 09:53:17: Loading kernelspec from C:\Users\Rich\AppData\Roaming\jupyter\kernels\python38564bitnewenva505dbed71cb446c9a13776ef63c3022\kernel.json for undefined
9576 Info 2021-02-04 09:53:17: Loading kernelspec from C:\Users\Rich\AppData\Roaming\jupyter\kernels\python38564bitnewenvf0bb265f0c244e87a9c278656fb7397d\kernel.json for undefined
9576 Info 2021-02-04 09:53:17: Loading kernelspec from C:\Users\Rich\AppData\Roaming\jupyter\kernels\python38564bitwindowsstoreed21effdb18f4d02bee149250bfd2668\kernel.json for undefined

@janegilring
Copy link
Author

Ok, I have now enabled debug logging - relaunched VS Code Insiders and copied the output of the Jupyter output tab:

User belongs to experiment group 'jupyterTest'
User belongs to experiment group 'NativeNotebookEditor'
Info 2021-02-04 19:18:52: ZMQ install verified.
Info 2021-02-04 19:18:52: Found existing keyfile at c:\Users\Jan Egil Ring\AppData\Roaming\Code - Insiders\User\globalStorage\ms-toolsai.jupyter\nbsecret
Info 2021-02-04 19:18:52: Attempting to start a server because of preload conditions ...
Info 2021-02-04 19:18:52: Searching for kernel based on {} for Untitled-2.ipynb
Info 2021-02-04 19:18:54: Cached data exists getEnvironmentVariables, <No Resource>
Info 2021-02-04 19:18:54: Cached data exists getEnvironmentVariables, <No Resource>
Info 2021-02-04 19:18:54: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" -c "import jupyter"
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" -c "import jupyter"
Info 2021-02-04 19:18:54: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" -c "import jupyter"
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" -c "import jupyter"
Info 2021-02-04 19:18:54: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" -c "import notebook"
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" -c "import notebook"
Info 2021-02-04 19:18:54: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" -c "import notebook"
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" -c "import notebook"
Info 2021-02-04 19:18:54: Cached data exists getEnvironmentVariables, <No Resource>
Info 2021-02-04 19:18:54: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" jupyter kernelspec --version
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" jupyter kernelspec --version
Info 2021-02-04 19:18:54: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" jupyter kernelspec --version
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" jupyter kernelspec --version
Info 2021-02-04 19:18:55: Cached data exists getEnvironmentVariables, <No Resource>
Info 2021-02-04 19:18:55: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" -c "import ipykernel"
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" -c "import ipykernel"
Info 2021-02-04 19:18:55: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" -c "import ipykernel"
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" -c "import ipykernel"
Info 2021-02-04 19:18:55: Cached data exists getEnvironmentVariables, <No Resource>
Info 2021-02-04 19:18:55: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe -c "import os;print(os.path.realpath("C:\\Users\\Jan Egil Ring\\AppData\\Roaming\\jupyter\\kernels"))"
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe -c "import os;print(os.path.realpath("C:\\Users\\Jan Egil Ring\\AppData\\Roaming\\jupyter\\kernels"))"
Info 2021-02-04 19:18:55: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe -c "import os;print(os.path.realpath("C:\\Users\\Jan Egil Ring\\AppData\\Roaming\\jupyter\\kernels"))"
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe -c "import os;print(os.path.realpath("C:\\Users\\Jan Egil Ring\\AppData\\Roaming\\jupyter\\kernels"))"
Info 2021-02-04 19:18:55: Loading kernelspec from C:\ProgramData\Anaconda3\share\jupyter\kernels\python3\kernel.json for C:\ProgramData\Anaconda3\python.exe
Info 2021-02-04 19:18:55: Find kernel spec, Class name = E, completed in 2790ms, has a truthy return value, Arg 1: <Uri:Untitled-2.ipynb>, Arg 2: {"language_info":{"name":"python","nbconvert_exporter":"python"},"orig_nbformat":2}, Arg 3: {"_isCancelled":false,"_emitter":null}, Return Value: {"specFile":"C:\\ProgramData\\Anaconda3\\share\\jupyter\\kernels\\python3\\kernel.json","interpreterPath":"C:\\ProgramData\\Anaconda3\\python.exe","name":"python3","argv":["C:/ProgramData/Anaconda3\\python.exe","-m","ipykernel_launcher","-f","{connection_file}"],"language":"python","path":"C:/ProgramData/Anaconda3\\python.exe","display_name":"Python 3"}
Info 2021-02-04 19:18:56: Cached data exists getEnvironmentVariables, <No Resource>
Info 2021-02-04 19:18:56: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 2021-02-04 19:18:56: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 2021-02-04 19:18:56: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 2021-02-04 19:18:56: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 2021-02-04 19:18:56: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 2021-02-04 19:18:56: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 2021-02-04 19:18:56: Found matching interpreter based on metadata, for the kernel python3, Python 3
Info 2021-02-04 19:18:56: Find kernel spec, Class name = I, completed in 4107ms, has a truthy return value, Arg 1: <Uri:Untitled-2.ipynb>, Arg 2: {"language_info":{"name":"python","nbconvert_exporter":"python"},"orig_nbformat":2}, Arg 3: {"_isCancelled":false,"_emitter":null}, Arg 4: true, Return Value: {"kind":"startUsingKernelSpec","kernelSpec":{"specFile":"C:\\ProgramData\\Anaconda3\\share\\jupyter\\kernels\\python3\\kernel.json","interpreterPath":"C:\\ProgramData\\Anaconda3\\python.exe","name":"python3","argv":["C:/ProgramData/Anaconda3\\python.exe","-m","ipykernel_launcher","-f","{connection_file}"],"language":"python","path":"C:/ProgramData/Anaconda3\\python.exe","display_name":"Python 3"},"interpreter":{"architecture":3,"path":"C:\\ProgramData\\Anaconda3\\python.exe","version":{"options":{"loose":false,"includePrerelease":false},"loose":false,"raw":"3.8.5-final","major":3,"minor":8,"patch":5,"prerelease":["final"],"build":[],"version":"3.8.5-final"},"sysVersion":"3.8.5 (default, Sep  3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)]","sysPrefix":"C:\\ProgramData\\Anaconda3","fileHash":"554e326512125706e9afb35241bcb8c43db334e00aa163fc5b93bb6bc1977250b65e717904dc619fc7a233b890d68dc201a936380f64a217635370a5675c4c52","companyDisplayName":"Anaconda, Inc.","envType":"Conda","displayName":"Python 3.8.5 64-bit (conda)","__store":true}}
Info 2021-02-04 19:18:57: Cached data exists getEnvironmentVariables, <No Resource>
Info 2021-02-04 19:18:57: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
Info 2021-02-04 19:18:57: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
Info 2021-02-04 19:18:57: Python Daemon (pid: 22740): Execute rpc method prewarm_kernel in DS Daemon
Info 2021-02-04 19:18:57: Python Daemon (pid: 22740): Execute rpc method prewarm_kernel from C:\Users\Jan Egil Ring\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe
Info 2021-02-04 19:18:57: Python Daemon (pid: 22740): Pre-Warm DS Kernel in DS Kernel Launcher Daemon
Info 2021-02-04 19:18:57: Python Daemon (pid: 22740): Exec in DS Kernel Launcher Daemon (observable) ['C:\\Users\\Jan Egil Ring\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\\python.exe', 'c:\\Users\\Jan Egil Ring\\.vscode-insiders\\extensions\\ms-toolsai.jupyter-2020.12.414227025\\pythonFiles\\vscode_datascience_helpers\\..\\pyvsc-run-isolated.py', 'c:\\Users\\Jan Egil Ring\\.vscode-insiders\\extensions\\ms-toolsai.jupyter-2020.12.414227025\\pythonFiles\\vscode_datascience_helpers\\kernel_prewarm_starter.py']
Info 2021-02-04 19:18:57: Python Daemon (pid: 22740): Exec in DS Kernel Launcher Daemon (observable)
Info 2021-02-04 19:18:57: Python Daemon (pid: 22740): Kernel launched, with PID 22012
Warn 2021-02-04 19:18:57: Python Daemon (pid: 22740): Waiting for Kernel to die 22012
Info 2021-02-04 19:18:57: Python Daemon (pid: 22740): Kernel launched, with PID as a daemon 22012

One additional piece of information: I noticed that the working machine had Anaconda installed, so I went ahead and installed it on the problematic one too. After that, the Anaconda Python kernel shows up as well:
image

jupyter kernelspec list is still the same though:

jupyter kernelspec list
Available kernels:
  python3            C:\Users\Jan Egil Ring\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\ipykernel\resources
  .net-csharp        C:\Users\Jan Egil Ring\AppData\Roaming\jupyter\kernels\.net-csharp
  .net-fsharp        C:\Users\Jan Egil Ring\AppData\Roaming\jupyter\kernels\.net-fsharp
  .net-powershell    C:\Users\Jan Egil Ring\AppData\Roaming\jupyter\kernels\.net-powershell

@rchiodo
Copy link
Contributor

rchiodo commented Feb 4, 2021

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:

~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe -c "import os;print(os.path.realpath("C:\\Users\\Jan Egil Ring\\AppData\\Roaming\\jupyter\\kernels"))"

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"))

@janegilring
Copy link
Author

It does, but the directory does not exist

image

@janegilring
Copy link
Author

janegilring commented Feb 4, 2021

On the working machine on the other hand, it does exist

image

Good catch with regards to the spaces in the username, that might be the culprit.

@rchiodo
Copy link
Contributor

rchiodo commented Feb 4, 2021

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.

@janegilring
Copy link
Author

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:

User belongs to experiment group 'jupyterTest'
User belongs to experiment group 'NativeNotebookEditor'
Info 2021-02-04 20:03:29: Attempting to start a server because of preload conditions ...
Info 2021-02-04 20:03:29: ZMQ install verified.
Info 2021-02-04 20:03:29: Found existing keyfile at c:\Users\Jan Egil Ring\AppData\Roaming\Code - Insiders\User\globalStorage\ms-toolsai.jupyter\nbsecret
Info 2021-02-04 20:03:29: Attempting to start a server because of preload conditions ...
Info 2021-02-04 20:03:30: Searching for kernel based on {"display_name":"PowerShell","language":"powershell","name":"powershell"} for Untitled-3.ipynb
Info 2021-02-04 20:03:30: Loading kernelspec from C:\Users\Jan Egil Ring\AppData\Roaming\jupyter\kernels\powershell\kernel.json for undefined
Error 2021-02-04 20:03:30: Failed to parse kernelspec C:\Users\Jan Egil Ring\AppData\Roaming\jupyter\kernels\powershell\kernel.json
Info 2021-02-04 20:03:31: Trusting notebook...
Info 2021-02-04 20:03:31: Wrote trust for untitled:Untitled-3.ipynb to c:\Users\Jan Egil Ring\AppData\Roaming\Code - Insiders\User\globalStorage\ms-toolsai.jupyter\nbsignatures\c1d15903ee99c1220d188eaa5811ca620f042055abc2b1d52c39aa490afd06b3
Info 2021-02-04 20:03:32: Cached data exists getEnvironmentVariables, <No Resource>
Info 2021-02-04 20:03:32: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" -c "import ipykernel"
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" -c "import ipykernel"
Info 2021-02-04 20:03:32: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" -c "import ipykernel"
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" -c "import ipykernel"
Info 2021-02-04 20:03:32: Cached data exists getEnvironmentVariables, <No Resource>
Info 2021-02-04 20:03:32: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe -c "import os;print(os.path.realpath("C:\\Users\\Jan Egil Ring\\AppData\\Roaming\\jupyter\\kernels"))"
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe -c "import os;print(os.path.realpath("C:\\Users\\Jan Egil Ring\\AppData\\Roaming\\jupyter\\kernels"))"
Info 2021-02-04 20:03:32: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe -c "import os;print(os.path.realpath("C:\\Users\\Jan Egil Ring\\AppData\\Roaming\\jupyter\\kernels"))"
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe -c "import os;print(os.path.realpath("C:\\Users\\Jan Egil Ring\\AppData\\Roaming\\jupyter\\kernels"))"
Info 2021-02-04 20:03:32: Cached data exists getEnvironmentVariables, <No Resource>
Info 2021-02-04 20:03:32: Loading kernelspec from C:\ProgramData\Anaconda3\share\jupyter\kernels\python3\kernel.json for C:\ProgramData\Anaconda3\python.exe
Info 2021-02-04 20:03:33: Cached data exists getEnvironmentVariables, <No Resource>
Info 2021-02-04 20:03:33: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe -c "import os;print(os.path.realpath("C:\\Users\\Jan Egil Ring\\AppData\\Roaming\\jupyter\\kernels"))"
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe -c "import os;print(os.path.realpath("C:\\Users\\Jan Egil Ring\\AppData\\Roaming\\jupyter\\kernels"))"
Info 2021-02-04 20:03:33: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe -c "import os;print(os.path.realpath("C:\\Users\\Jan Egil Ring\\AppData\\Roaming\\jupyter\\kernels"))"
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe -c "import os;print(os.path.realpath("C:\\Users\\Jan Egil Ring\\AppData\\Roaming\\jupyter\\kernels"))"
Info 2021-02-04 20:03:34: Find kernel spec, Class name = E, completed in 4096ms, has a falsy return value, Arg 1: <Uri:Untitled-3.ipynb>, Arg 2: {"kernelspec":{"display_name":"PowerShell","language":"powershell","name":"powershell"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.8.5"},"orig_nbformat":2}, Arg 3: {"_isCancelled":false,"_emitter":null}, Return Value: undefined
Info 2021-02-04 20:03:34: > C:\ProgramData\Anaconda3\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" -c "import jupyter"
> C:\ProgramData\Anaconda3\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" -c "import jupyter"
Info 2021-02-04 20:03:34: > C:\ProgramData\Anaconda3\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" -c "import notebook"
> C:\ProgramData\Anaconda3\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" -c "import notebook"
Info 2021-02-04 20:03:35: > C:\ProgramData\Anaconda3\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" jupyter kernelspec --version
> C:\ProgramData\Anaconda3\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" jupyter kernelspec --version
Info 2021-02-04 20:03:35: Find kernel spec, Class name = I, completed in 5403ms, has a truthy return value, Arg 1: <Uri:Untitled-3.ipynb>, Arg 2: {"kernelspec":{"display_name":"PowerShell","language":"powershell","name":"powershell"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.8.5"},"orig_nbformat":2}, Arg 3: {"_isCancelled":false,"_emitter":null}, Arg 4: true, Return Value: {"kind":"startUsingPythonInterpreter","interpreter":{"architecture":3,"path":"C:\\Users\\Jan Egil Ring\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\python.exe","version":{"options":{"loose":false,"includePrerelease":false},"loose":false,"raw":"3.9.1-final","major":3,"minor":9,"patch":1,"prerelease":["final"],"build":[],"version":"3.9.1-final"},"sysVersion":"3.9.1 (tags/v3.9.1:1e5d33e, Dec  7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)]","sysPrefix":"C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.496.0_x64__qbz5n2kfra8p0","fileHash":"89852e09e2f133c805d36822ea02350823c742e7bda9f395e82745159de3b1329370da2381962ea89e84c5626e7131bc884c4e920c68a93843a411653733dde0","envType":"Unknown","displayName":"Python 3.9.1 64-bit"}}
Error 2021-02-04 20:03:35: Jupyter Kernel Spec not found for a local connection
Info 2021-02-04 20:03:35: > C:\ProgramData\Anaconda3\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> C:\ProgramData\Anaconda3\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 2021-02-04 20:03:35: > C:\ProgramData\Anaconda3\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> C:\ProgramData\Anaconda3\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 2021-02-04 20:03:35: > C:\ProgramData\Anaconda3\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> C:\ProgramData\Anaconda3\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 2021-02-04 20:03:38: Cached data exists getEnvironmentVariables, <No Resource>
Info 2021-02-04 20:03:38: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
Info 2021-02-04 20:03:38: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
Info 2021-02-04 20:03:38: Python Daemon (pid: 24436): Execute rpc method prewarm_kernel in DS Daemon
Info 2021-02-04 20:03:38: Python Daemon (pid: 24436): Execute rpc method prewarm_kernel from C:\Users\Jan Egil Ring\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe
Info 2021-02-04 20:03:38: Python Daemon (pid: 24436): Pre-Warm DS Kernel in DS Kernel Launcher Daemon
Info 2021-02-04 20:03:38: Python Daemon (pid: 24436): Exec in DS Kernel Launcher Daemon (observable) ['C:\\Users\\Jan Egil Ring\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\python.exe', 'c:\\Users\\Jan Egil Ring\\.vscode-insiders\\extensions\\ms-toolsai.jupyter-2020.12.414227025\\pythonFiles\\vscode_datascience_helpers\\..\\pyvsc-run-isolated.py', 'c:\\Users\\Jan Egil Ring\\.vscode-insiders\\extensions\\ms-toolsai.jupyter-2020.12.414227025\\pythonFiles\\vscode_datascience_helpers\\kernel_prewarm_starter.py']
Info 2021-02-04 20:03:38: Python Daemon (pid: 24436): Exec in DS Kernel Launcher Daemon (observable)
Info 2021-02-04 20:03:38: Python Daemon (pid: 24436): Kernel launched, with PID 25364
Warn 2021-02-04 20:03:38: Python Daemon (pid: 24436): Waiting for Kernel to die 25364
Info 2021-02-04 20:03:38: Python Daemon (pid: 24436): Kernel launched, with PID as a daemon 25364

Now when running jupyter kernelspec list, the command is not found - so I suppose it is missing from the PATH

@rchiodo
Copy link
Contributor

rchiodo commented Feb 4, 2021

You'll have to reinstall jupyter into the new 3.9 version. pip install jupyter should work.

@janegilring
Copy link
Author

Forgot to state that I did so, but I re-ran it now:

pip install jupyter
Requirement already satisfied: jupyter in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (1.0.0)
Requirement already satisfied: qtconsole in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from jupyter) (5.0.2)
Requirement already satisfied: ipywidgets in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from jupyter) (7.6.3)
Requirement already satisfied: ipykernel in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from jupyter) (5.4.3)
Requirement already satisfied: nbconvert in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from jupyter) (6.0.7)
Requirement already satisfied: notebook in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from jupyter) (6.2.0)
Requirement already satisfied: jupyter-console in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from jupyter) (6.2.0)
Requirement already satisfied: jupyter-client in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from ipykernel->jupyter) (6.1.11)
Requirement already satisfied: tornado>=4.2 in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from ipykernel->jupyter) (6.1)
Requirement already satisfied: traitlets>=4.1.0 in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from ipykernel->jupyter) (5.0.5)
Requirement already satisfied: ipython>=5.0.0 in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from ipykernel->jupyter) (7.20.0)
Requirement already satisfied: setuptools>=18.5 in c:\program files\windowsapps\pythonsoftwarefoundation.python.3.9_3.9.496.0_x64__qbz5n2kfra8p0\lib\site-packages (from ipython>=5.0.0->ipykernel->jupyter) (49.2.1)
Requirement already satisfied: pickleshare in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from ipython>=5.0.0->ipykernel->jupyter) (0.7.5)
Requirement already satisfied: colorama in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from ipython>=5.0.0->ipykernel->jupyter) (0.4.4)
Requirement already satisfied: jedi>=0.16 in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from ipython>=5.0.0->ipykernel->jupyter) (0.18.0)
Requirement already satisfied: decorator in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from ipython>=5.0.0->ipykernel->jupyter) (4.4.2)
Requirement already satisfied: pygments in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from ipython>=5.0.0->ipykernel->jupyter) (2.7.4)
Requirement already satisfied: backcall in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from ipython>=5.0.0->ipykernel->jupyter) (0.2.0)
Requirement already satisfied: prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from ipython>=5.0.0->ipykernel->jupyter) (3.0.14)
Requirement already satisfied: parso<0.9.0,>=0.8.0 in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from jedi>=0.16->ipython>=5.0.0->ipykernel->jupyter) (0.8.1)
Requirement already satisfied: wcwidth in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->ipython>=5.0.0->ipykernel->jupyter) (0.2.5)
Requirement already satisfied: ipython-genutils in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from traitlets>=4.1.0->ipykernel->jupyter) (0.2.0)
Requirement already satisfied: widgetsnbextension~=3.5.0 in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from ipywidgets->jupyter) (3.5.1)
Requirement already satisfied: nbformat>=4.2.0 in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from ipywidgets->jupyter) (5.1.2)
Requirement already satisfied: jupyterlab-widgets>=1.0.0 in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from ipywidgets->jupyter) (1.0.0)
Requirement already satisfied: jsonschema!=2.5.0,>=2.4 in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from nbformat>=4.2.0->ipywidgets->jupyter) (3.2.0)
Requirement already satisfied: jupyter-core in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from nbformat>=4.2.0->ipywidgets->jupyter) (4.7.1)
Requirement already satisfied: pyrsistent>=0.14.0 in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets->jupyter) (0.17.3)
Requirement already satisfied: attrs>=17.4.0 in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets->jupyter) (20.3.0)
Requirement already satisfied: six>=1.11.0 in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets->jupyter) (1.15.0)
Requirement already satisfied: argon2-cffi in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from notebook->jupyter) (20.1.0)
Requirement already satisfied: pyzmq>=17 in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from notebook->jupyter) (22.0.2)
Requirement already satisfied: terminado>=0.8.3 in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from notebook->jupyter) (0.9.2)
Requirement already satisfied: jinja2 in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from notebook->jupyter) (2.11.3)
Requirement already satisfied: Send2Trash>=1.5.0 in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from notebook->jupyter) (1.5.0)
Requirement already satisfied: prometheus-client in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from notebook->jupyter) (0.9.0)
Requirement already satisfied: python-dateutil>=2.1 in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from jupyter-client->ipykernel->jupyter) (2.8.1)
Requirement already satisfied: pywin32>=1.0 in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from jupyter-core->nbformat>=4.2.0->ipywidgets->jupyter) (300)
Requirement already satisfied: pywinpty>=0.5 in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from terminado>=0.8.3->notebook->jupyter) (0.5.7)
Requirement already satisfied: cffi>=1.0.0 in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from argon2-cffi->notebook->jupyter) (1.14.4)
Requirement already satisfied: pycparser in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from cffi>=1.0.0->argon2-cffi->notebook->jupyter) (2.20)
Requirement already satisfied: MarkupSafe>=0.23 in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from jinja2->notebook->jupyter) (1.1.1)
Requirement already satisfied: testpath in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from nbconvert->jupyter) (0.4.4)
Requirement already satisfied: pandocfilters>=1.4.1 in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from nbconvert->jupyter) (1.4.3)
Requirement already satisfied: jupyterlab-pygments in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from nbconvert->jupyter) (0.1.2)
Requirement already satisfied: entrypoints>=0.2.2 in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from nbconvert->jupyter) (0.3)
Requirement already satisfied: defusedxml in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from nbconvert->jupyter) (0.6.0)
Requirement already satisfied: nbclient<0.6.0,>=0.5.0 in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from nbconvert->jupyter) (0.5.1)
Requirement already satisfied: bleach in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from nbconvert->jupyter) (3.3.0)
Requirement already satisfied: mistune<2,>=0.8.1 in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from nbconvert->jupyter) (0.8.4)
Requirement already satisfied: async-generator in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from nbclient<0.6.0,>=0.5.0->nbconvert->jupyter) (1.10)
Requirement already satisfied: nest-asyncio in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from nbclient<0.6.0,>=0.5.0->nbconvert->jupyter) (1.5.1)
Requirement already satisfied: webencodings in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from bleach->nbconvert->jupyter) (0.5.1)
Requirement already satisfied: packaging in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from bleach->nbconvert->jupyter) (20.9)
Requirement already satisfied: pyparsing>=2.0.2 in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from packaging->bleach->nbconvert->jupyter) (2.4.7)
Requirement already satisfied: qtpy in c:\users\jan egil ring\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from qtconsole->jupyter) (1.9.0)

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:

C:\Users\Jan Egil Ring\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts>jupyter kernelspec list
Available kernels:
  python3    C:\Users\Jan Egil Ring\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\ipykernel\resources

@rchiodo
Copy link
Contributor

rchiodo commented Feb 4, 2021

Okay so jupyter thinks you only have python3? If you rerun the .net installer does that let jupyter think it has .net kernels?

@janegilring
Copy link
Author

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:

jupyter kernelspec list
Available kernels:
  python3    C:\Users\Jan Egil Ring\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\ipykernel\resources

Next I ran the following:

dotnet interactive jupyter install

Welcome to .NET Interactive!
---------------------
Telemetry
---------
The .NET Core tools collect usage data in order to help us improve your experience.The data is anonymous and doesn't include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_INTERACTIVE_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.

Installing using jupyter kernelspec module.
Installed ".NET (C#)" kernel.
Installing using jupyter kernelspec module.
Installed ".NET (F#)" kernel.
Installing using jupyter kernelspec module.
Installed ".NET (PowerShell)" kernel.

C:\Users\Jan Egil Ring>jupyter kernelspec list
Available kernels:
  python3            C:\Users\Jan Egil Ring\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\ipykernel\resources
  .net-csharp        C:\Users\Jan Egil Ring\AppData\Roaming\jupyter\kernels\.net-csharp
  .net-fsharp        C:\Users\Jan Egil Ring\AppData\Roaming\jupyter\kernels\.net-fsharp
  .net-powershell    C:\Users\Jan Egil Ring\AppData\Roaming\jupyter\kernels\.net-powershell

So far so good. Also, when checking in VS Code Insiders:

image

However, when trying to execute a PowerShell-based cell:

User belongs to experiment group 'jupyterTest'
User belongs to experiment group 'NativeNotebookEditor'
Info 2021-02-04 20:27:26: Attempting to start a server because of preload conditions ...
Info 2021-02-04 20:27:26: ZMQ install verified.
Info 2021-02-04 20:27:27: Found existing keyfile at c:\Users\Jan Egil Ring\AppData\Roaming\Code - Insiders\User\globalStorage\ms-toolsai.jupyter\nbsecret
Info 2021-02-04 20:27:27: Attempting to start a server because of preload conditions ...
Info 2021-02-04 20:27:27: Searching for kernel based on {} for Untitled-1.ipynb
Info 2021-02-04 20:27:29: Cached data exists getEnvironmentVariables, <No Resource>
Info 2021-02-04 20:27:29: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" -c "import ipykernel"
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" -c "import ipykernel"
Info 2021-02-04 20:27:29: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" -c "import ipykernel"
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" -c "import ipykernel"
Info 2021-02-04 20:27:29: Loading kernelspec from C:\ProgramData\Anaconda3\share\jupyter\kernels\python3\kernel.json for C:\ProgramData\Anaconda3\python.exe
Info 2021-02-04 20:27:29: Loading kernelspec from C:\Users\Jan Egil Ring\AppData\Roaming\jupyter\kernels\.net-csharp\kernel.json for undefined
Info 2021-02-04 20:27:29: Loading kernelspec from C:\Users\Jan Egil Ring\AppData\Roaming\jupyter\kernels\.net-fsharp\kernel.json for undefined
Info 2021-02-04 20:27:29: Loading kernelspec from C:\Users\Jan Egil Ring\AppData\Roaming\jupyter\kernels\.net-powershell\kernel.json for undefined
Info 2021-02-04 20:27:29: Find kernel spec, Class name = E, completed in 2772ms, has a truthy return value, Arg 1: <Uri:Untitled-1.ipynb>, Arg 2: {"language_info":{"name":"python","nbconvert_exporter":"python"},"orig_nbformat":2}, Arg 3: {"_isCancelled":false,"_emitter":null}, Return Value: {"specFile":"C:\\ProgramData\\Anaconda3\\share\\jupyter\\kernels\\python3\\kernel.json","interpreterPath":"C:\\ProgramData\\Anaconda3\\python.exe","name":"python3","argv":["C:/ProgramData/Anaconda3\\python.exe","-m","ipykernel_launcher","-f","{connection_file}"],"language":"python","path":"C:/ProgramData/Anaconda3\\python.exe","display_name":"Python 3"}
Info 2021-02-04 20:27:31: > C:\ProgramData\Anaconda3\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" -c "import jupyter"
> C:\ProgramData\Anaconda3\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" -c "import jupyter"
Info 2021-02-04 20:27:31: > C:\ProgramData\Anaconda3\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" -c "import notebook"
> C:\ProgramData\Anaconda3\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" -c "import notebook"
Info 2021-02-04 20:27:31: Found matching interpreter based on metadata, for the kernel python3, Python 3
Info 2021-02-04 20:27:31: Find kernel spec, Class name = I, completed in 4207ms, has a truthy return value, Arg 1: <Uri:Untitled-1.ipynb>, Arg 2: {"language_info":{"name":"python","nbconvert_exporter":"python"},"orig_nbformat":2}, Arg 3: {"_isCancelled":false,"_emitter":null}, Arg 4: true, Return Value: {"kind":"startUsingKernelSpec","kernelSpec":{"specFile":"C:\\ProgramData\\Anaconda3\\share\\jupyter\\kernels\\python3\\kernel.json","interpreterPath":"C:\\ProgramData\\Anaconda3\\python.exe","name":"python3","argv":["C:/ProgramData/Anaconda3\\python.exe","-m","ipykernel_launcher","-f","{connection_file}"],"language":"python","path":"C:/ProgramData/Anaconda3\\python.exe","display_name":"Python 3"},"interpreter":{"architecture":3,"path":"C:\\ProgramData\\Anaconda3\\python.exe","version":{"options":{"loose":false,"includePrerelease":false},"loose":false,"raw":"3.8.5-final","major":3,"minor":8,"patch":5,"prerelease":["final"],"build":[],"version":"3.8.5-final"},"sysVersion":"3.8.5 (default, Sep  3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)]","sysPrefix":"C:\\ProgramData\\Anaconda3","fileHash":"554e326512125706e9afb35241bcb8c43db334e00aa163fc5b93bb6bc1977250b65e717904dc619fc7a233b890d68dc201a936380f64a217635370a5675c4c52","companyDisplayName":"Anaconda, Inc.","envType":"Conda","displayName":"Python 3.8.5 64-bit (conda)","__store":true}}
Info 2021-02-04 20:27:31: > C:\ProgramData\Anaconda3\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" jupyter kernelspec --version
> C:\ProgramData\Anaconda3\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" jupyter kernelspec --version
Info 2021-02-04 20:27:31: Cached data exists getEnvironmentVariables, <No Resource>
Info 2021-02-04 20:27:32: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
Info 2021-02-04 20:27:32: > ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> ~\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
Info 2021-02-04 20:27:32: > C:\ProgramData\Anaconda3\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> C:\ProgramData\Anaconda3\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 2021-02-04 20:27:32: > C:\ProgramData\Anaconda3\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> C:\ProgramData\Anaconda3\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 2021-02-04 20:27:32: > C:\ProgramData\Anaconda3\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> C:\ProgramData\Anaconda3\python.exe "c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 2021-02-04 20:27:32: Python Daemon (pid: 17868): Execute rpc method prewarm_kernel in DS Daemon
Info 2021-02-04 20:27:32: Python Daemon (pid: 17868): Execute rpc method prewarm_kernel from C:\Users\Jan Egil Ring\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe
Info 2021-02-04 20:27:32: Python Daemon (pid: 17868): Pre-Warm DS Kernel in DS Kernel Launcher Daemon
Info 2021-02-04 20:27:32: Python Daemon (pid: 17868): Exec in DS Kernel Launcher Daemon (observable) ['C:\\Users\\Jan Egil Ring\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\python.exe', 'c:\\Users\\Jan Egil Ring\\.vscode-insiders\\extensions\\ms-toolsai.jupyter-2020.12.414227025\\pythonFiles\\vscode_datascience_helpers\\..\\pyvsc-run-isolated.py', 'c:\\Users\\Jan Egil Ring\\.vscode-insiders\\extensions\\ms-toolsai.jupyter-2020.12.414227025\\pythonFiles\\vscode_datascience_helpers\\kernel_prewarm_starter.py']
Info 2021-02-04 20:27:32: Python Daemon (pid: 17868): Exec in DS Kernel Launcher Daemon (observable)
Info 2021-02-04 20:27:32: Python Daemon (pid: 17868): Kernel launched, with PID 19124
Warn 2021-02-04 20:27:32: Python Daemon (pid: 17868): Waiting for Kernel to die 19124
Info 2021-02-04 20:27:32: Python Daemon (pid: 17868): Kernel launched, with PID as a daemon 19124
Info 2021-02-04 20:28:00: Trusting notebook...
Info 2021-02-04 20:28:00: Wrote trust for untitled:Untitled-1.ipynb to c:\Users\Jan Egil Ring\AppData\Roaming\Code - Insiders\User\globalStorage\ms-toolsai.jupyter\nbsignatures\6d06b82122aa8160f2475f938718fda4e92baad1e53ed21e72ae1be2d3ebf0ef
Info 2021-02-04 20:28:00: Execute Cell in kernelWithMetadata.ts
Info 2021-02-04 20:28:00: Creating raw notebook for untitled:Untitled-1.ipynb
Info 2021-02-04 20:28:00: Getting preferred kernel for untitled:Untitled-1.ipynb
Info 2021-02-04 20:28:00: Searching for kernel based on {"name":".net-powershell","display_name":".NET (PowerShell)"} for Untitled-1.ipynb
Info 2021-02-04 20:28:00: Find kernel spec, Class name = E, completed in 1ms, has a truthy return value, Arg 1: <Uri:Untitled-1.ipynb>, Arg 2: {"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":3},"orig_nbformat":2,"kernelspec":{"name":".net-powershell","display_name":".NET (PowerShell)"}}, Arg 3: {"_isCancelled":false,"_emitter":null}, Return Value: {"specFile":"C:\\Users\\Jan Egil Ring\\AppData\\Roaming\\jupyter\\kernels\\.net-powershell\\kernel.json","name":".net-powershell","argv":["dotnet","interactive","jupyter","--default-kernel","powershell","--http-port-range","1000-3000","{connection_file}"],"language":"PowerShell","path":"dotnet","display_name":".NET (PowerShell)","metadata":{"vscode":{"extension_id":"ms-dotnettools.dotnet-interactive-vscode","kernel_id":"dotnet-interactive"}}}
Info 2021-02-04 20:28:02: Find kernel spec, Class name = I, completed in 1262ms, has a truthy return value, Arg 1: <Uri:Untitled-1.ipynb>, Arg 2: {"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":3},"orig_nbformat":2,"kernelspec":{"name":".net-powershell","display_name":".NET (PowerShell)"}}, Arg 3: {"_isCancelled":false,"_emitter":null}, Arg 4: undefined, Return Value: {"kind":"startUsingKernelSpec","kernelSpec":{"specFile":"C:\\Users\\Jan Egil Ring\\AppData\\Roaming\\jupyter\\kernels\\.net-powershell\\kernel.json","name":".net-powershell","argv":["dotnet","interactive","jupyter","--default-kernel","powershell","--http-port-range","1000-3000","{connection_file}"],"language":"PowerShell","path":"dotnet","display_name":".NET (PowerShell)","metadata":{"vscode":{"extension_id":"ms-dotnettools.dotnet-interactive-vscode","kernel_id":"dotnet-interactive"}}}}
Info 2021-02-04 20:28:03: Computing working directory untitled:Untitled-1.ipynb
Info 2021-02-04 20:28:03: Connecting to raw session for untitled:Untitled-1.ipynb
Info 2021-02-04 20:28:03: Cached data exists getEnvironmentVariables, Untitled-1.ipynb
Info 2021-02-04 20:28:03: No custom variables for Kernel as interpreter path is not defined for kernel
Info 2021-02-04 20:28:03: > dotnet interactive jupyter --default-kernel powershell --http-port-range 1000-3000 C:\Users\JANEGI~1\AppData\Local\Temp\tmp-24180pyRSUAYx3zKh.json
> dotnet interactive jupyter --default-kernel powershell --http-port-range 1000-3000 C:\Users\JANEGI~1\AppData\Local\Temp\tmp-24180pyRSUAYx3zKh.json
Info 2021-02-04 20:28:03: cwd: ~\AppData\Local\Programs\Microsoft VS Code Insiders
cwd: ~\AppData\Local\Programs\Microsoft VS Code Insiders
Info 2021-02-04 20:28:03: KernelProcess error: Could not execute because the specified command or file was not found.
Possible reasons for this include:
  * You misspelled a built-in dotnet command.
  * You intended to execute a .NET program, but dotnet-interactive does not exist.
  * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
Warn 2021-02-04 20:28:03: StdErr from Kernel Process Could not execute because the specified command or file was not found.
Possible reasons for this include:
  * You misspelled a built-in dotnet command.
  * You intended to execute a .NET program, but dotnet-interactive does not exist.
  * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
Info 2021-02-04 20:28:03: KernelProcess error: 

Warn 2021-02-04 20:28:03: StdErr from Kernel Process 

Info 2021-02-04 20:28:03: KernelProcess Exit Exit - 1
Error 2021-02-04 20:28:33: Timed out waiting to get a heartbeat from kernel process.
Error 2021-02-04 20:28:33: Failed to connect raw kernel session: Error: Timed out waiting to get a heartbeat from kernel process.
Info 2021-02-04 20:28:33: Shutdown session -- complete
Error 2021-02-04 20:28:33: failed to create INotebook in kernel [Error: Timed out waiting to get a heartbeat from kernel process.
	at m.waitForHeartbeat (c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\out\client\extension.js:49:637256)]
Error 2021-02-04 20:28:33: DataScience Error [Error: Timed out waiting to get a heartbeat from kernel process.
	at m.waitForHeartbeat (c:\Users\Jan Egil Ring\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\out\client\extension.js:49:637256)]

@rchiodo
Copy link
Contributor

rchiodo commented Feb 4, 2021

It looks like it's running this command:

dotnet interactive jupyter

Is that command runnable from a plain command prompt? You may need to add something to your path.

@janegilring
Copy link
Author

Yes:

dotnet interactive jupyter
Required argument missing for command: jupyter

jupyter:
  Starts dotnet-interactive as a Jupyter kernel

Usage:
  dotnet-interactive jupyter [options] <connection-file> [command]

Arguments:
  <connection-file>    The path to a connection file provided by Jupyter

Options:
  --default-kernel <default-kernel>      The default language for the kernel [default: csharp]
  --http-port-range <http-port-range>    Specifies the range of ports to use to enable HTTP services [default:
                                         1000-3000]
  --log-path <log-path>                  Enable file logging to the specified directory
  --verbose                              Enable verbose logging to the console
  -?, -h, --help                         Show help and usage information

Commands:
  install    Install the .NET kernel for Jupyter

@rchiodo
Copy link
Contributor

rchiodo commented Feb 4, 2021

Hmm, well it might be we're not creating the tmp file with the kernel data in it.

dotnet interactive jupyter --default-kernel powershell --http-port-range 1000-3000 
C:\Users\JANEGI~1\AppData\Local\Temp\tmp-24180pyRSUAYx3zKh.json <-- this part here

Does a python kernel work?

@janegilring
Copy link
Author

I see...yes:

image

@janegilring
Copy link
Author

janegilring commented Feb 4, 2021

Here is the content of a json-file created in the Temp-directory while trying to run a PowerShell cell:

{"key":"1473eafd-441b-4922-960a-6d112ff47389","signature_scheme":"hmac-sha256","transport":"tcp","ip":"127.0.0.1","hb_port":9025,"control_port":9026,"shell_port":9027,"stdin_port":9028,"iopub_port":9029,"kernel_name":".net-powershell"}

Could it be the issue regarding spaces in the username which is biting?
.net-powershell C:\Users\Jan Egil Ring\AppData\Roaming\jupyter\kernels.net-powershell

@rchiodo
Copy link
Contributor

rchiodo commented Feb 4, 2021

Could it be the issue regarding spaces in the username which is biting?
.net-powershell C:\Users\Jan Egil Ring\AppData\Roaming\jupyter\kernels.net-powershell

Ah yes. That's likely it. We're not quoting the parameters for non python kernels.

Thanks for the help diagnosing :)

@janegilring
Copy link
Author

Thank you for your patience - I would never have gotten this far without some assistance :)

Are there any workarounds applicable?

@rchiodo
Copy link
Contributor

rchiodo commented Feb 4, 2021

You'd have to rename your user (which I'm not sure is possible)

@janegilring
Copy link
Author

janegilring commented Feb 4, 2021

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.

@rchiodo
Copy link
Contributor

rchiodo commented Feb 4, 2021

Although it looks like we're passing the shortened version here:

dotnet interactive jupyter --default-kernel powershell --http-port-range 1000-3000 C:\Users\JANEGI~1\AppData\Local\Temp\tmp-24180pyRSUAYx3zKh.json

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?

@janegilring
Copy link
Author

It was not around, but I re-created the file using the content I pasted earlier.

dotnet interactive jupyter --default-kernel powershell --http-port-range 1000-3000 C:\Users\JANEGI~1\AppData\Local\Temp\tmp-24180pyRSUAYx3zKh.json
. <-- Blinking cursor

I think it works - I suppose it is listening for requests.

@janegilring
Copy link
Author

janegilring commented Feb 4, 2021

I found a workaround :)

I created a symbolic link pointing to a path without spaces:
C:\Users\janring
to my profile path:
C:\Users\Jan Egil Ring

I then launched VS Code Insiders using the symbolic link path:
"C:\Users\janring\AppData\Local\Programs\Microsoft VS Code Insiders\Code - Insiders.exe"

I then tested again:
image

Happy days 😊

However, what do you think is the root cause of this? VS Code? dotnet interactive? jupyter?

@rchiodo
Copy link
Contributor

rchiodo commented Feb 4, 2021

Good workaround idea 👍

If that workaround fixes it, it's our problem. We must not be quoting the arguments.

@janegilring
Copy link
Author

One quick question which I`m also wondering if might be due to the space in the username or something else:

In the docs a variable explorer and data viewer is mentioned:
image

However, I can`t see it:
image

@rchiodo
Copy link
Contributor

rchiodo commented Feb 5, 2021

You're using the insiders version. It doesn't currently have that feature yet. Should be soon though.

@janegilring
Copy link
Author

Ah - thanks.

@rchiodo rchiodo changed the title Missing notebook Kernels in Kernel selection dropdown Cannot launch other kernels if the user folder has a space in the path. Feb 5, 2021
@rchiodo rchiodo removed the info-needed Issue requires more information from poster label Feb 5, 2021
@DavidKutu DavidKutu self-assigned this Mar 17, 2021
@DonJayamanne
Copy link
Contributor

Confirmed on Mac, but then again, having spaces in mac was not the issue.
Leaving for someont else to validate on windows.

@greazer greazer added this to the April 2021 Release milestone Mar 24, 2021
@greazer greazer closed this as completed Jun 6, 2021
@greazer greazer reopened this Jun 6, 2021
@IanMatthewHuff
Copy link
Member

@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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug notebook-execution Kernels issues (start/restart/switch/execution, install ipykernel)
Projects
None yet
Development

No branches or pull requests

6 participants