美文网首页
安装SeuratData的解决办法

安装SeuratData的解决办法

作者: 千容安 | 来源:发表于2022-11-10 11:13 被阅读0次

    想要LoadData("ifnb")需要library(SeuratData),但是devtools::install_github('satijalab/seurat-data')会报ERROR: lazy loading failed for package 'SeuratData'

    甚至library还出了错(之前一直正常library):

    library(Seurat)
    Error: package or namespace load failed for ‘Seurat’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
    载入了名字空间‘spatstat.utils’ 2.3-1,但需要的是>= 3.0.0

    尝试安装|包源:|spatstat.utils_3.0-1.tar.gz |

     install.packages("E:/下载/spatstat.utils_3.0-1.tar.gz", repos = NULL, type = "source")
    WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
    https://cran.rstudio.com/bin/windows/Rtools/
    * installing *source* package 'spatstat.utils' ...
    ** package 'spatstat.utils' successfully unpacked and MD5 sums checked
    ERROR: cannot remove earlier installation, is it in use?
    * removing 'D:/R-4.2.1/library/spatstat.utils'
    * restoring previous 'D:/R-4.2.1/library/spatstat.utils'
    Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
      problem copying D:\R-4.2.1\library\00LOCK-spatstat.utils\spatstat.utils\libs\x64\spatstat.utils.dll to D:\R-4.2.1\library\spatstat.utils\libs\x64\spatstat.utils.dll: Permission denied
    Warning in install.packages :
      安装程序包‘E:/下载/spatstat.utils_3.0-1.tar.gz’时退出狀態的值不是0
    安装spatstat.utils_3.0-1.zip时:Error in install.packages : package ‘spatstat.utils’ not installed because it is not built for UCRT
    

    remove.packages("spatstat.utils")

    install.packages("E:/下载/spatstat.utils_3.0-1.tar.gz", repos = NULL, type = "source")
    WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
    
    https://cran.rstudio.com/bin/windows/Rtools/
    * installing *source* package 'spatstat.utils' ...
    ** package 'spatstat.utils' successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs
    Warning in system(cmd) : 'make' not found
    ERROR: compilation failed for package 'spatstat.utils'
    * removing 'D:/R-4.2.1/library/spatstat.utils'
    Warning in install.packages :
      安装程序包‘E:/下载/spatstat.utils_3.0-1.tar.gz’时退出狀態的值不是0
    

    安装了Rtools,配置了环境变量,然后再安装spatstat.utils_3.0-1.tar.gz。一定是.gz,.zip不行。spatstat.utils_3.0-1成功安装。

    然后再devtools::install_github('satijalab/seurat-data')就行了

    之前一直可以library(Seurat)的,突然不行了,花一上午时间搞这个

    packageurl = 'https://cran.r-project.org/src/contrib/vctrs_0.5.0.tar.gz'
    install.packages(packageurl, repos = NULL, type = 'source')
    

    相关文章

      网友评论

          本文标题:安装SeuratData的解决办法

          本文链接:https://www.haomeiwen.com/subject/bbiotdtx.html