一般安裝步驟
install.packages(c('repr', 'IRdisplay', 'evaluate', 'crayon', 'pbdZMQ', 'devtools', 'uuid', 'digest'))
devtools::install_github('IRkernel/IRkernel')
IRkernel::installspec(user = FALSE)
這是網上遇到一般的情況安裝,這裏就我遇到的問題一一列舉
- install.packages下載慢的情況,在Rstudio中進行換源
options("http://mirrors.utsc.edu.cn/CRAN")
- devtools安裝失敗的情況,我看了一下安裝devtools時候最開始的報錯情況,是openssl沒有安裝上,使用install.packages安裝openssl的時候還是報錯,解決的方法是在終端另外安裝一個依賴庫,見[文章1][http://blog.sina.com.cn/s/blog_82613ab70102x8v9.html]
sudo apt-get install openssl
sudo apt-get install libssl-dev
- IRkernel安裝的時候報錯,
jupyter-client has to be installed but “jupyter kernelspec --version” exited with code 127
[文章2][https://stackoverflow.com/questions/44056164/jupyter-client-has-to-be-installed-but-jupyter-kernelspec-version-exited-wit]提了很多辦法,我在終端試了一下jupyter kernelspec --version,沒有報錯,我解決問題採用的是命令
sudo ln -s /home/'my user name'/anaconda3/bin/jupyter /usr/bin/jupyter