微慑信息网

[GO]如何在Goの环境下添加内核到jupyter notbook

最近学习GO语言,想着在调试的时候有像在python下的jupyter notbook一样方便的工具就好了,

其实jupyter notbook支持Go语言内核,需要把go的内核添加到jupyter notbook就好了,步骤如下:

1、python下安装jupyter notebook

2、Go下安装模块:

gophernotes

go get github.com/gopherdata/gophernotes

3、在jupyter的kernels下新建一个golang文件夹

新建一个kernel.json文件,内容如下:

{
 "argv": [
  "C:\\Users\\***\\go\\bin\\gophernotes.exe",
  "{connection_file}"
 ],
 "display_name": "go  (ipykernel)",
 "language": "Go",
 "metadata": {
  "debugger": true
 }

}

 

其中gophernotes.exe的生成方法:

(1)下载:

https://github.com/gopherdata/gophernotes/releases

 

(2)安装:下载后解压,然后运行如下命令进行安装

go install

 

安装之后生成gophernotes.exe

4、运行jupyter notebook

能在jupyter notebook中的”NEW” 看到go的内核

 

新建GO内核,测试OK:

 

 

本文标题:[GO]如何在Goの环境下添加内核到jupyter notbook
本文链接:
(转载请附上本文链接)
https://vulsee.com/archives/vulsee_2023/0525_16911.html
转载请附本站链接,未经允许不得转载,,谢谢:微慑信息网-VulSee.com » [GO]如何在Goの环境下添加内核到jupyter notbook
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

微慑信息网 专注工匠精神

访问我们联系我们