我正在尝试按照这份指南在jupyter笔记本中使用R作为可用语言。
第一步是运行:
install.packages(c('repr', 'IRdisplay', 'evaluate', 'crayon', 'pbdZMQ', 'devtools', 'uuid', 'digest'))
但是即使运行了这个命令,我仍然无法执行下一步操作:
devtools::install_github('IRkernel/IRkernel')
返回错误:
Error in loadNamespace(name) : there is no package called ‘devtools’
如果您查看我发布的链接的评论部分,似乎还有其他人遇到了这个问题。
更新: Scott Richie建议我重新运行install.packages('devtools') 这返回:
The downloaded source packages are in
‘/tmp/RtmpgBI8IU/downloaded_packages’
Warning messages:
1: In install.packages("devtools") :
installation of package ‘curl’ had non-zero exit status
2: In install.packages("devtools") :
installation of package ‘openssl’ had non-zero exit status
3: In install.packages("devtools") :
installation of package ‘git2r’ had non-zero exit status
4: In install.packages("devtools") :
installation of package ‘httr’ had non-zero exit status
5: In install.packages("devtools") :
installation of package ‘gh’ had non-zero exit status
6: In install.packages("devtools") :
installation of package ‘usethis’ had non-zero exit status
7: In install.packages("devtools") :
installation of package ‘devtools’ had non-zero exit status
更新2:
我阅读了相关帖子,成功获取了开发工具。但是我遇到了一个问题:
> IRkernel::installspec()
Error in IRkernel::installspec() :
jupyter-client has to be installed but “jupyter kernelspec --version” exited with code 1.
另一个线程以代码127退出,但对我没有解决方案。 : jupyter-client必须被安装,但“jupyter kernelspec --version”退出了代码127
install.packages()
命令的输出吗?可能出现了某些错误。再次运行install.packages('devtools')
来进行检查。 - Scott Ritchie