JupyterNoteBook-GO
如有错误,欢迎指出
错误
error: Cannot assign requested address
c.NotebookApp.ip='123.21.242.32'c.NotebookApp.password = u'sha1:f012129dbf38:a3673a44bc5145ef336ea6940db21676fce9f85a'c.NotebookApp.open_browser = Falsec.NotebookApp.port = 8888c.NotebookApp.notebook_dir = '/root/home/Jupyter/'c.InteractiveShellApp.matplotlib = 'inline'
解决:将c.NotebookApp.ip
改成0.0.0.0
c.NotebookApp.ip='0.0.0.0'c.NotebookApp.password = u'sha1:f012129dbf38:a3673a44bc5145ef336ea6940db21676fce9f85a'c.NotebookApp.open_browser = Falsec.NotebookApp.port = 8888c.NotebookApp.notebook_dir = '/root/home/Jupyter/'c.InteractiveShellApp.matplotlib = 'inline'
Install-Go
解压安装包wget https://golang.org/dl/
获取软件包tar -C /usr/local go*
将压缩包解压至/usr/local
,此路径为官方推荐export PATH=/usr/local/go/bin:$PATH
配置命令环境 Install gophernotes
gophernotes
是go
内核,jupyter notebook
需要安装其才能使用go来启用交互式编程
Question1:无法寻找命令
error: command not found: gophernotes
gophernotes
提示没有此命令,即可以按以下解决find / -name 'gophernotes'
寻找系统gophernotes
命令 例如返回路径/root/go/bin:$PATH
export PATH=/root/go/bin:$PATH
正常即可获取响应2019/02/25 15:43:04 Need a command line argument specifying the connection file.
Question2:内存不足,溢出
error: fatal error: runtime: out of memory
Question3:jupyter内核错误,提示没有gophernotes
文件或文件夹
修改kernels
中gophernotes
的kernel.json
中argv
的参数
# 原来的{ "argv": [ "gophernotes", "{connection_file}" ], "display_name": "Go", "language": "go", "name": "go"}
# 现在的,将命令变成绝对路径{ "argv": [ "/root/go/bin/gophernotes", "{connection_file}" ], "display_name": "Go", "language": "go", "name": "go"}
重启jupyter-notebook
即可
参考资料
1.
2. 3. 4.