上篇回顾:VSCode and NoteBook for JavaScript
<https://www.cnblogs.com/dotnetcrazy/p/9962192.html>

正常流程

安装Go语言:sudo apt install golang

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

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



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



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

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





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



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



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

运行gophernotes



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



异常处理

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

* 安装前需要安装相关依赖
* 安装完成后记得导入下Path


 扩展:环境变量执行顺序参考 <https://blog.csdn.net/code_segment/article/details/79871111>