天天看点

Golang Kernel For Jupyter-NoteBook

上篇回顾:VSCode and NoteBook for JavaScript

安装Go语言:sudo apt install golang

安装内核的相关依赖包:sudo apt install libzmq3-dev pkg-config

Copy包到本地:go get -u github.com/gopherdata/gophernotes

Golang Kernel For Jupyter-NoteBook

在NoteBook中创建新的内核文件夹:mkdir -p ~/.local/share/jupyter/kernels/gophernotes

Golang Kernel For Jupyter-NoteBook

复制Go内核相关配置文件:

cp ~/go/src/github.com/gopherdata/gophernotes/kernel/* ~/.local/share/jupyter/kernels/gophernotes/

Golang Kernel For Jupyter-NoteBook
Golang Kernel For Jupyter-NoteBook

这时候NoteBook已经有Go内核的选项了(但是还不能用)

Golang Kernel For Jupyter-NoteBook

配置一下环境:echo 'export PATH="/home/用户名/go/bin:$PATH"' >> ~/.bashrc

Golang Kernel For Jupyter-NoteBook

更新一下环境:source ~/.bashrc

运行gophernotes

Golang Kernel For Jupyter-NoteBook

然后就正常使用了(个别情况reboot重启一下就ok了)

Golang Kernel For Jupyter-NoteBook

如果失败可以查看下面内容:

安装前需要安装相关依赖

安装完成后记得导入下Path

Golang Kernel For Jupyter-NoteBook

 扩展:环境变量执行顺序参考

作者:毒逆天

出处:https://www.cnblogs.com/dotnetcrazy

打赏:<b>18i4JpL6g54yAPAefdtgqwRrZ43YJwAV5z</b>

本文版权归作者和博客园共有。欢迎转载,但必须保留此段声明,且在文章页面明显位置给出原文连接!

下一篇: 10步配置CME