在安装了devtools之后,R中仍然没有叫做devtools的软件包。

9

我正在尝试按照这份指南在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


5
你检查了install.packages()命令的输出吗?可能出现了某些错误。再次运行install.packages('devtools')来进行检查。 - Scott Ritchie
我刚刚再次运行了它,我认为你是对的,这就是问题所在。我现在正在更新我的帖子,并附上错误信息。 - Qwertford
你用的是什么系统? - iod
也可能是 https://dev59.com/x2Ei5IYBdhLWcg3w0PCQ 的重复问题。 - iod
我正在使用最新的Lubuntu 18.10 AMD64。 - Qwertford
1个回答

0
我发现一个快速简单的解决方案是:
  1. 打开Anaconda Navigator

  2. 打开你正在使用的环境。

  3. 转到未安装部分,然后搜索Dev工具,您应该看到“r-dev工具”选项。

  4. 点击应用并完成。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接