Centos7.6安装工具(7)--安装gophernotes(jupyter notebook下安装go内核)

官网安装方法:

https://github.com/gopherdata/gophernotes#linux

 

一、下载gophernotes

从github上下载

https://github.com/gopherdata/gophernotes

sudo su

yum install -y zeromq zeromq-devel
# go get -u github.com/gopherdata/gophernotes # 下载多次失败,采用网页下载
# 网页下载
wget https://github.com/gopherdata/gophernotes/archive/master.zip
unzip gophernotes-master.zip 
mv gophernotes-master/* $GOPATH/src/github.com/gopherdata/gophernotes/
go build github.com/gopherdata/gophernotes
go install github.com/gopherdata/gophernotes

mkdir -p ~/.local/share/jupyter/kernels/gophernotes
cp $GOPATH/src/github.com/gopherdata/gophernotes/kernel/* ~/.local/share/jupyter/kernels/gophernotes

# 制定具体的路径
vi ~/.local/share/jupyter/kernels/gophernotes/kernel.json
{
    "argv": [
	"/mnt/S_LINUX_DATA/mycode/golang/bin/gophernotes",
    	"{connection_file}"
    	],
    "display_name": "Go",
    "language": "go",
    "name": "go"
}

# 启动程序进行测试
/usr/local/python374/bin/jupyter-notebook --config=/mnt/S_LINUX_DATA/mycode/jupyter/config/jupyter_notebook_config.py --no-browser -y --allow-root

 

二、创建内核:

mkdir -p ~/.local/share/jupyter/kernels/gophernotes
cp $GOPATH/src/github.com/gopherdata/gophernotes/kernel/* ~/.local/share/jupyter/kernels/gophernotes
# 或者
mkdir -p /usr/local/share/jupyter/kernels/gophernotes
cp $GOPATH/src/github.com/gopherdata/gophernotes/kernel/* /usr/local/share/jupyter/kernels/gophernotes

三、go安装好,把GOPATH/bin的目录加入到PATH中,然后重启 最后启动jupyter notebook。

四、测试

 

五、错误处理

1、报错

go get -u github.com/gopherdata/gophernotes
# pkg-config --cflags  -- libzmq
Package libzmq was not found in the pkg-config search path.
Perhaps you should add the directory containing `libzmq.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libzmq' found
pkg-config: exit status 1

解决: sudo yum install -y zeromq zeromq-devel

 

 

 

 

 

转载于:https://my.oschina.net/mengyoufengyu/blog/3086472

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值