简体   繁体   English

在Windows上安装软件包devtools和caller时出现问题

[英]Problems installing packages devtools and callr on Windows

Installing package devtools I obtained the following message 安装软件包devtoolsdevtools以下消息

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

Moreover: 此外:

* 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

and

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

Then I tried to update processx package, hoping that it could fix the problem: 然后,我尝试更新processx软件包,希望它可以解决此问题:

install.packages("processx")
library(processx)

RStudio asked me to restart R session but then RStudio要求我重新启动R会话,然后

> 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

What am I doing wrong? 我究竟做错了什么?

EDIT I tried with installing processx and callr with their dependencies in this way 编辑我尝试以这种方式安装processxcallr及其依赖项

install.packages("processx", dependencies=TRUE)
library(processx)
install.packages("callr", dependencies=TRUE)
library(callr)

but I obtained the message: 但是我得到了消息:

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. 我认为您的问题是,需要安装最新的Rtools版本。 Devtools will install properly including dependencies to callr and processx after Rtools is installed. 安装Rtools之后,Devtools将正确安装,包括对调用方和processx的依赖关系。 So do the following: 因此,请执行以下操作:

  1. Delete the callr and processx and devtools packages from your library folder under your Rversion folder. 从Rversion文件夹下的library文件夹中删除caller以及processx和devtools软件包。
  2. Close Rstudio or R shell. 关闭Rstudio或R shell。
  3. 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 从此站点下载推荐的版本: https : //cran.r-project.org/bin/windows/Rtools/ 按照此处的说明操作: http : //jtleek.com/modules/01_DataScientistToolbox/02_10_rtools/#6
  4. After rtools and then devtools are installed, check with find_rtools() if TRUE 在安装rtools和devtools之后,请使用find_rtools()检查是否为TRUE

Now callr and processx should be installed also as you can see in your library folder. 现在,如在库文件夹中所见,还应该安装caller和processx。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM