问题描述
安装软件包 devtools
我收到以下消息
Installing package devtools
I obtained the following message
There are binary versions available but the source versions are later:
binary source needs_compilation
processx 3.3.1 3.4.0 TRUE
callr 3.2.0 3.3.0 FALSE
此外:
* installing *source* package 'callr' ...
** package 'callr' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck =
vI[[j]]) :
namespace 'processx' 3.3.1 is being loaded, but >= 3.4.0 is required
和
ERROR: lazy loading failed for package 'callr'
* removing 'C:/Users/Standard/Documents/R/win-library/3.6/callr'
Warning in install.packages :
installation of package ‘callr’ had non-zero exit status
然后我尝试了更新 processx
包,希望它可以解决问题:
Then I tried to update processx
package, hoping that it could fix the problem:
install.packages("processx")
library(processx)
RStudio要求我重新启动R会话,然后
RStudio asked me to restart R session but then
> install.packages("devtools")
ERROR: lazy loading failed for package 'callr'
* removing 'C:/Users/Standard/Documents/R/win-library/3.6/callr'
Warning in install.packages :
installation of package ‘callr’ had non-zero exit status
我在做什么错了?
编辑我尝试安装 processx
和 caller
及其依赖关系
EDIT I tried with installing processx
and callr
with their dependencies in this way
install.packages("processx", dependencies=TRUE)
library(processx)
install.packages("callr", dependencies=TRUE)
library(callr)
,但我收到消息:
Error in library(callr) : there is no package called ‘callr’
推荐答案
I had same problem. I think your problem is, that latest Rtools version needs to be installed. Devtools will install properly including dependencies to callr and processx after Rtools is installed. So do the following:
- 从Rversion文件夹下的库文件夹中删除调用程序以及processx和devtools程序包。
- 关闭Rstudio或R shell。
- 从此站点下载推荐版本:
请按照此处的说明进行操作: - 在安装了rtools和devtools之后,请使用find_rtools()检查是否为真
- Delete the callr and processx and devtools packages from your library folder under your Rversion folder.
- Close Rstudio or R shell.
- Download recommended version from this site:https://cran.r-project.org/bin/windows/Rtools/Follow instructions here: http://jtleek.com/modules/01_DataScientistToolbox/02_10_rtools/#6
- After rtools and then devtools are installed, check with find_rtools() if TRUE
现在还应该安装调用程序和processx正如您在资料库文件夹中看到的那样。
Now callr and processx should be installed also as you can see in your library folder.
这篇关于在Windows上安装软件包devtools和caller时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!