我正在尝试将Rcpp从1.0.6更新到1.0.7或1.0.8。Rcpp更新对于我打算使用的主R库是必不可少的。
我查看了文档并尝试使用以下方法安装Rcpp:
install.packages("Rcpp", repos="https://RcppCore.github.io/drat")安装完成,但更新没有发生。我在下面附上了这些命令和sessionInfo()信息:
library(Seurat)
Error: package or namespace load failed for ‘Seurat’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
namespace ‘Rcpp’ 1.0.6 is already loaded, but >= 1.0.7 is required
> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux Server release 6.7 (Santiago)
Matrix products: default
BLAS: /usr/lib64/libblas.so.3.2.1
LAPACK: /usr/lib64/liblapack.so.3.2.1
Random number generation:
RNG: Mersenne-Twister
Normal: Inversion
Sample: Rounding
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] Rcpp_1.0.6
loaded via a namespace (and not attached):
[1] MASS_7.3-54 compiler_4.0.2 Matrix_1.2-18 tools_4.0.2
[5] RColorBrewer_1.1-2 RANN_2.6.1 KernSmooth_2.23-17 grid_4.0.2
[9] lattice_0.20-44 ROCR_1.0-11 发布于 2022-02-04 18:56:55
所以你使用的是Seurat。这是一个包含许多递归依赖项的大型包:
> db <- tools::CRAN_package_db()
> tools::package_dependencies("Seurat", recursive=TRUE, db=db)
$Seurat
[1] "methods" "cluster" "cowplot"
[4] "fitdistrplus" "future" "future.apply"
[7] "ggplot2" "ggrepel" "ggridges"
[10] "graphics" "grDevices" "grid"
[13] "httr" "ica" "igraph"
[16] "irlba" "jsonlite" "KernSmooth"
[19] "leiden" "lmtest" "MASS"
[22] "Matrix" "matrixStats" "miniUI"
[25] "patchwork" "pbapply" "plotly"
[28] "png" "RANN" "RColorBrewer"
[31] "Rcpp" "RcppAnnoy" "reticulate"
[34] "rlang" "ROCR" "Rtsne"
[37] "scales" "scattermore" "sctransform"
[40] "SeuratObject" "shiny" "spatstat.core"
[43] "spatstat.geom" "stats" "tibble"
[46] "tools" "utils" "uwot"
[49] "RcppEigen" "RcppProgress" "gtable"
[52] "survival" "digest" "globals"
[55] "listenv" "parallel" "parallelly"
[58] "glue" "isoband" "mgcv"
[61] "withr" "plyr" "curl"
[64] "mime" "openssl" "R6"
[67] "magrittr" "pkgconfig" "zoo"
[70] "lattice" "htmltools" "viridisLite"
[73] "base64enc" "htmlwidgets" "tidyr"
[76] "dplyr" "vctrs" "lazyeval"
[79] "crosstalk" "purrr" "data.table"
[82] "promises" "RcppTOML" "here"
[85] "rappdirs" "gplots" "farver"
[88] "labeling" "lifecycle" "munsell"
[91] "reshape2" "gridExtra" "RcppArmadillo"
[94] "httpuv" "xtable" "fontawesome"
[97] "sourcetools" "later" "crayon"
[100] "fastmap" "commonmark" "bslib"
[103] "cachem" "ellipsis" "spatstat.data"
[106] "nlme" "rpart" "spatstat.utils"
[109] "spatstat.sparse" "abind" "tensor"
[112] "goftest" "deldir" "polyclip"
[115] "fansi" "pillar" "FNN"
[118] "RSpectra" "dqrng" "sass"
[121] "jquerylib" "generics" "tidyselect"
[124] "BH" "sitmo" "codetools"
[127] "gtools" "caTools" "rprojroot"
[130] "yaml" "splines" "colorspace"
[133] "askpass" "cli" "utf8"
[136] "stringr" "cpp11" "sys"
[139] "bitops" "fs" "stringi"
> 并不是所有这些都是编译的包,但有些是。还有一些可能对Rcpp具有(递归)依赖关系。我怀疑其中一个或多个版本是针对Rcpp版本1.0.6构建的,所以我尝试运行update.packages()来让您的包堆栈向前推进。然后再试一次
不管它的价值如何,在我的Ubuntu系统中,我没有任何问题:
> sapply(c("Rcpp", "Seurat"), packageVersion)
$Rcpp
[1] 1 0 8
$Seurat
[1] 4 1 0
> 编辑实际上,也许它是简单得多。Seurat告诉您您需要1.0.7或更高版本。您自己的日志显示
other attached packages:
[1] Rcpp_1.0.6因此,我建议退出您所处的分离状态(因为Rcpp是附加的),启动一个新的会话(确保没有加载Rcpp ),更新Rcpp,然后尝试安装Seurat。
还要注意的是,我们在1.0.6和1.0.7之间做了一个改变,这使得混合变得困难。因此,一旦更新了Rcpp,就应该重新构建使用它的包。
https://stackoverflow.com/questions/70991393
复制相似问题