簡體   English   中英

在Windows上安裝軟件包devtools和caller時出現問題

[英]Problems installing packages devtools and callr on Windows

安裝軟件包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

此外:

* 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軟件包,希望它可以解決此問題:

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

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

我究竟做錯了什么?

編輯我嘗試以這種方式安裝processxcallr及其依賴項

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

但是我得到了消息:

Error in library(callr) : there is no package called ‘callr’

我有同樣的問題。 我認為您的問題是,需要安裝最新的Rtools版本。 安裝Rtools之后,Devtools將正確安裝,包括對調用方和processx的依賴關系。 因此,請執行以下操作:

  1. 從Rversion文件夾下的library文件夾中刪除caller以及processx和devtools軟件包。
  2. 關閉Rstudio或R shell。
  3. 從此站點下載推薦的版本: https : //cran.r-project.org/bin/windows/Rtools/ 按照此處的說明操作: http : //jtleek.com/modules/01_DataScientistToolbox/02_10_rtools/#6
  4. 在安裝rtools和devtools之后,請使用find_rtools()檢查是否為TRUE

現在,如在庫文件夾中所見,還應該安裝caller和processx。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM