You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
PolyglotNotebooksStudy/Docs/安装与配置-Polyglot Notebooks.md

44 lines
2.1 KiB
Markdown

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# Jupyter Notebook 和 Polyglot Notebooks
Jupyter Notebook安装另文说明。本文档主要安装与配置`Polyglot Notebook`,`Polyglot Notebook`与Jupyter结合使用
安装环境 windows11 22H2(Windows Server 2022 21H2)、Python 3.11.4、JupyterNote 7.0.2、 JupyterLab 4.0.4
## Polyglot Notebooks 安装及配合
`Polyglot Notebook` 是`VS Code插件``VS Code`使用此插件充当前端UI部分后台服务是基于.net core的微软开发的`.net interactive`[项目](https://github.com/dotnet/interactive).
安装`Polyglot Notebook`插件时VS Code会自动安装一些相关的服务啥的。
### 前提:安装 .Net7(当前是.Net7)
### 前提安装VS Code
### Polyglot Notebooks 安装及配置
+ 打开 `VS Code`,插件安装界面输入C#或.net core,在插件列表中选择并安装相关插件(非必需但开发c#要先安装上)
+ 打开 `VS Code`,插件安装界面输入Polyglot Notebooks 选择并安装 `Polyglot Notebooks`插件
+ 等待插件安装结束VSCode会自动安装相关插件和服务
+ 等待安装结束
+ VS Code中创建使用 Polyglot Notebooks 略过。有专用的使用学习项目。
### 结合Jupyter一起使用
+ Jupyter安装`.net interactive`
```cmd
#1安装 `.net interactive` 到.net全局工具
dotnet tool install --global Microsoft.dotnet-interactive
#2安装
dotnet interactive jupyter install
#3 查看验证
打开jupyter,可以看到里面除python外还有C#、F#、Powershell等先项
#4 vs code中新建或打开笔记本文件在内核选择中可以选中本机的 "现有的Jupyter服务"输入地址与密码连接Jupyter服务。
```
### 连接到远程 Jupyter服务器
+ 配置好Jupyter远程服务,使用可以在浏览器中远程访问
+ 使用远程Jupyter服务
vs code中新建或打开笔记本文件在内核选择中选中 `现有的Jupyter服务`输入远程地址与密码连接到Jupyter服务。
### `.net interactive`有一个命令行项目可以替代vs code的UI层执行写好的笔记。适合命令行使用。