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

failed to connect jupyter #3819

Open
3 of 17 tasks
hjy1210 opened this issue Jan 23, 2025 · 1 comment
Open
3 of 17 tasks

failed to connect jupyter #3819

hjy1210 opened this issue Jan 23, 2025 · 1 comment
Labels
Area-Jupyter subkernels bug Something isn't working duplicate This issue or pull request already exists

Comments

@hjy1210
Copy link

hjy1210 commented Jan 23, 2025

Describe the bug

I try to use Polyglot notebook extension with mixed csharp and python in Visual Studio Code. My steps are:

  1. notebook use .NET Interactive as kernel
  2. add csharp cell and execute, OK
  3. add html content and execute, OK
  4. use magic command #!connect jupyter --kernel-name pythonkernel --conda-env anapy310 --kernel-spec python3 to connect Python kernel, where anapy310 is my conda environment.

error occured with following message:

Error: System.ArgumentException: KernelSpec python3 not found
   at Microsoft.DotNet.Interactive.Jupyter.ZMQ.JupyterConnection.CreateKernelConnectionAsync(String kernelSpecName) in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive.Jupyter\ZMQ\JupyterConnection.cs:line 47
   at Microsoft.DotNet.Interactive.Jupyter.JupyterKernelConnector.CreateKernelAsync(String kernelName) in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive.Jupyter\JupyterKernelConnector.cs:line 27
   at Microsoft.DotNet.Interactive.Jupyter.ConnectJupyterKernelDirective.ConnectKernelsAsync(ConnectJupyterKernel connectCommand, KernelInvocationContext context) in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive.Jupyter\ConnectJupyterKernelDirective.cs:line 70
   at Microsoft.DotNet.Interactive.CompositeKernel.ConnectKernel[TCommand](TCommand command, ConnectKernelDirective`1 connectDirective, KernelInvocationContext context) in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive\CompositeKernel.cs:line 253
   at Microsoft.DotNet.Interactive.CompositeKernel.<>c__DisplayClass20_0`1.<<AddConnectDirective>b__0>d.MoveNext() in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive\CompositeKernel.cs:line 238
--- End of stack trace from previous location ---
   at Microsoft.DotNet.Interactive.Kernel.HandleAsync(KernelCommand command, KernelInvocationContext context) in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive\Kernel.cs:line 365
   at Microsoft.DotNet.Interactive.CompositeKernel.HandleAsync(KernelCommand command, KernelInvocationContext context) in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive\CompositeKernel.cs:line 194
   at Microsoft.DotNet.Interactive.KernelCommandPipeline.<BuildPipeline>b__6_0(KernelCommand command, KernelInvocationContext context, KernelPipelineContinuation _) in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive\KernelCommandPipeline.cs:line 60
   at Microsoft.DotNet.Interactive.KernelCommandPipeline.<>c__DisplayClass6_1.<<BuildPipeline>b__3>d.MoveNext() in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive\KernelCommandPipeline.cs:line 75
--- End of stack trace from previous location ---
   at Microsoft.DotNet.Interactive.App.KernelExtensions.<>c__DisplayClass5_0.<<UseTelemetrySender>b__0>d.MoveNext() in D:\a\_work\1\s\src\dotnet-interactive\KernelExtensions.cs:line 296
--- End of stack trace from previous location ---
   at Microsoft.DotNet.Interactive.KernelCommandPipeline.<>c__DisplayClass6_1.<<BuildPipeline>b__3>d.MoveNext() in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive\KernelCommandPipeline.cs:line 75
--- End of stack trace from previous location ---
   at Microsoft.DotNet.Interactive.App.KernelExtensionLoader.<>c__DisplayClass0_0.<<UseNuGetExtensions>b__0>d.MoveNext() in D:\a\_work\1\s\src\dotnet-interactive\KernelExtensionLoader.cs:line 25
--- End of stack trace from previous location ---
   at Microsoft.DotNet.Interactive.KernelCommandPipeline.<>c__DisplayClass6_1.<<BuildPipeline>b__3>d.MoveNext() in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive\KernelCommandPipeline.cs:line 75
--- End of stack trace from previous location ---
   at Microsoft.DotNet.Interactive.App.KernelExtensions.<>c__DisplayClass4_0.<<UseSecretManager>b__0>d.MoveNext() in D:\a\_work\1\s\src\dotnet-interactive\KernelExtensions.cs:line 227
--- End of stack trace from previous location ---
   at Microsoft.DotNet.Interactive.KernelCommandPipeline.<>c__DisplayClass6_0.<<BuildPipeline>g__Combine|2>d.MoveNext() in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive\KernelCommandPipeline.cs:line 73
--- End of stack trace from previous location ---
   at Microsoft.DotNet.Interactive.KernelCommandPipeline.<>c__DisplayClass6_0.<<BuildPipeline>g__Combine|2>d.MoveNext() in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive\KernelCommandPipeline.cs:line 73
--- End of stack trace from previous location ---
   at Microsoft.DotNet.Interactive.KernelCommandPipeline.<>c__DisplayClass6_0.<<BuildPipeline>g__Combine|2>d.MoveNext() in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive\KernelCommandPipeline.cs:line 73
--- End of stack trace from previous location ---
   at Microsoft.DotNet.Interactive.KernelCommandPipeline.SendAsync(KernelCommand command, KernelInvocationContext context) in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive\KernelCommandPipeline.cs:line 41

Note: In environment anapy310, python version is 3.10.16

Please complete the following:

Which version of .NET Interactive are you using? (In a notebook, run the #!about magic command. ):
version of .NET Interactive is
Version: 1.0.607001+e2f2a48f93b828a07ac9883477565515fa1e47bf
Library version: 1.0.0-beta.25070.1+e2f2a48f93b828a07ac9883477565515fa1e47bf
Build date: 2025-01-22T03:57:34.1921481Z

  • OS
    • Windows 11
    • Windows 10
    • macOS
    • Linux (Please specify distro)
    • iOS
    • Android
  • Browser
    • Chrome
    • Edge
    • Firefox
    • Safari
  • Frontend
    • Jupyter Notebook
    • Jupyter Lab
    • nteract
    • Visual Studio Code
    • Visual Studio Code Insiders
    • Visual Studio
    • Other (please specify)

Screenshots

If applicable, add screenshots to help explain your problem.

Image

@jonsequitur jonsequitur added bug Something isn't working duplicate This issue or pull request already exists Area-Jupyter subkernels labels Jan 23, 2025
@jonsequitur
Copy link
Contributor

Others have reported this in #3813.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Jupyter subkernels bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants