Comments (13)
I followed https://github.com/dotnet/interactive/blob/HEAD/docs/jupyter-in-polyglot-notebooks.md and it worked for me. If you have already tried that, may be try the following in the .dip file and see if then python shows up as a code option.
#!connect jupyter --kernel-name pythonkernel --kernel-spec python3 (do this in csharp)
from interactive.
Good question, you made me go down the rabbit hole and figured out i was missing the iPython package. Thanks! :)
All is well now, I'm able to run Python code from the .NET Interactive kernel.
from interactive.
This indeed helped me fix an adjacent problem, terminal not recognizing python. Had to disable the python app execution aliases in windows settings.
Unfortunately this did not fix vscode not finding python.
Terminal:
> python --version
Python 3.11.7
VSCode dib file:
> #!connect jupyter --kernel-name pythonkernel --kernel-spec python3
The #!connect jupyter feature is in preview. Please report any feedback or issues at https://github.com/dotnet/interactive/issues/new/choose.
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.ConnectJupyterKernelCommand.ConnectKernelsAsync(KernelInvocationContext context, InvocationContext commandLineContext) in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive.Jupyter\ConnectJupyterKernelCommand.cs:line 72
at Microsoft.DotNet.Interactive.CompositeKernel.<>c__DisplayClass21_0.<<AddKernelConnector>b__0>d.MoveNext() in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive\CompositeKernel.cs:line 271
--- End of stack trace from previous location ---
at System.CommandLine.NamingConventionBinder.CommandHandler.GetExitCodeAsync(Object returnValue, InvocationContext context)
at System.CommandLine.NamingConventionBinder.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)
at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass15_0.<<AddMiddleware>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass19_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Invocation.InvocationPipeline.<InvokeAsync>g__FullInvocationChainAsync|2_0(InvocationContext context)
at System.CommandLine.Parsing.ParseResultExtensions.InvokeAsync(ParseResult parseResult, IConsole console)
at Microsoft.DotNet.Interactive.Commands.DirectiveCommand.InvokeAsync(KernelInvocationContext context) in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive\Commands\DirectiveCommand.cs:line 33
at Microsoft.DotNet.Interactive.Kernel.HandleAsync(KernelCommand command, KernelInvocationContext context) in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive\Kernel.cs:line 330
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.SendAsync(KernelCommand command, KernelInvocationContext context) in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive\KernelCommandPipeline.cs:line 41
ms-toolsai.jupyter: v2023.11.1100101639
from interactive.
Are you using anaconda?
from interactive.
No, no virtual environments. Haven't installed anaconda here.
from interactive.
I have the same issue and I'm using miniconda which comes with a Python version 3.11.5. Also I don't have conda or python in the PATH env variable.
from interactive.
Doesn't mini onda come with default environment as root or base?
from interactive.
it does yes, it's called "base", and it's not complaining about that, it's complaining about the KernelSpec: "KernelSpec python3 not found"
from interactive.
can you run jupyter kernelspec list
and see what are the kernel specs and share the paths?
from interactive.
@Regenhardt what do you see if you run the jupyter kernelspec list
command?
from interactive.
I get jupyter : The term 'jupyter' is not recognized as the name of a cmdlet, function, script file, or operable program.[...]
.
I installed/upgraded the notebook
package, pip list
includes notebook 7.0.7
(previously it was 7.0.1).
python/pip work, ipynb works too. PATH contains both Python\
and Python\Scripts\
. What am I missing?
from interactive.
I get
jupyter : The term 'jupyter' is not recognized as the name of a cmdlet, function, script file, or operable program.[...]
.I installed/upgraded the
notebook
package,pip list
includesnotebook 7.0.7
(previously it was 7.0.1). python/pip work, ipynb works too. PATH contains bothPython\
andPython\Scripts\
. What am I missing?
I usually install Jupyter using pip3 install jupyterlab
can you try that?
if the Jupyter command is not resolved it means Jupyter server is not installed and you don't have kernel spec available
from interactive.
Doing that results in a whole lot of "Requirement already satisfied" messages, the first being:
Requirement already satisfied: jupyterlab in e:\programs\python\lib\site-packages (4.0.10)
from interactive.
Related Issues (20)
- Incorrect behaviour of methods with `params` HOT 3
- Unable to format code cell (no formatter for 'polyglot-notebook' files) HOT 4
- Installing Microsoft.Windows.SDK.NET.Ref fails HOT 2
- Debugging a kernel crash HOT 1
- Issue System.TypeLoadException: Method 'WriteTo' in type .. does not have an implementation Windows 11
- CPU spinning on windows HOT 1
- dotnet interactive jupyter reports success, doesn't actually do anything.
- Don't name kernel directories starting with a period character
- Wrong .NET prerequisite is listed in the Marketplace
- Random stuck after restart kernel
- Enable nullable by default in C#
- Incorrect tooltip for Execute Cell button on Linux HOT 4
- #!about lists out of date copyright date for .NET Interactive
- Next press release about polygot? - Getting worried, haven't heard anything new. HOT 1
- Autoimport missing namespaces for C#/.NET in Polyglot Notebooks
- Missing command registration causes deadlock when command is deserialized
- ".NET 8 SDK Required" message keeps popping up in VS Code even though I have .NET 8 SDK installed HOT 8
- Fail to use dotnet interactive in Fabric 1.2 runtime
- Issue in downloading .NET interactive HOT 2
- #!connect fails when kernelspec is installed with --sys-prefix
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from interactive.