jupyter的文档相对少,且不完善,特将自己的安装心得记录如下,以供同路人使用。
首先安装需要的基础包
sudo apt-get install libzmq3-dev libssh2-1-dev python3-pip build-essential python3-dev libcurl4-openssl-dev libxml2-dev
增加rstudio的安装源
Add this line to /etc/apt/sources.list
deb http://cran.rstudio.com/bin/linux/ubuntu trusty/
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
继续安装需要的基础包
sudo apt-get update
sudo apt-get upgrade
注意不管以前装过没有,都要升级一下r-base,只有这样才可顺利安装devtools
sudo apt-get install r-base
sudo pip3 install -I path.py==7.7.1
sudo pip3 install jupyter zmq
安装R kernel for Jupyter
install.packages(c("curl","xml2","httr","rversions","devtools"))
library("devtools")
install_github("rgbkrk/rzmq")
install.packages(c('rzmq','repr','IRkernel','IRdisplay'), repos = c('http://irkernel.github.io/', getOption('repos')), type = 'source')
如果是使用jupyterhub,为每个用户安装irkernel很重要
su username
R
IRkernel::installspec()