美文网首页
基于Jupyter Notebooks的C# .NET Inte

基于Jupyter Notebooks的C# .NET Inte

作者: 融合xx | 来源:发表于2019-11-06 09:10 被阅读0次

.NET Interactive发布预览版了,可以像Python那样用jupyter notebooks来编辑C#代码。具体可以在GitHub上查看dotnet/interactive项目。

安装步骤

  • 安装好.NET Core 3.1 SDK
  • 安装好Python 3(默认有pip)
  • 安装Jupyter
pip install jupyter
  • 在命令行检查Jupyter是否正确安装
jupyter kernelspec list
  • 可以安装.NET Interactive了
dotnet tool install -g --add-source "https://dotnet.myget.org/F/dotnet-try/api/v3/index.json" Microsoft.dotnet-interactive
dotnet interactive jupyter install
  • 再次用jupyter kernelspec list查看检查安装好的.NET版本Jupyter,输出如下
  .net-csharp       ~\jupyter\kernels\.net-csharp
  .net-fsharp       ~\jupyter\kernels\.net-fsharp
  .net-powershell   ~\jupyter\kernels\.net-powershell
  python3           ~\jupyter\kernels\python3
  • 新建个项目并打开Jupyter Notebooks
mkdir yourapp
cd yourapp
jupyter notebook
  • 现在可以愉快地使用了,截图如下就OK了
Jupyter Notebooks界面

相关文章

网友评论

      本文标题:基于Jupyter Notebooks的C# .NET Inte

      本文链接:https://www.haomeiwen.com/subject/rldxbctx.html