簡體   English   中英

安裝 R package 時出錯:使用 Anaconda 的 scran

[英]Error installing R package: scran using Anaconda

我正在使用 anaconda 下載名為 scran 的 R package 雖然我已經將它下載到我的 R 庫路徑,但我收到了錯誤。 當我嘗試在我的 R 環境中加載我的 package 時,它也失敗了。 我在 macOS Catalina (10.15.4) 上。 我也嘗試BiocManager::install(scran) ,但也失敗了。

scran ( https://bioconductor.org/packages/release/bioc/html/scran.html )

有人可以幫幫我嗎? 非常感謝。 請參閱下面的詳細信息。

# 我使用conda install -c Bioconda bioconductor-scran

(scrnaseq) yaochung41@x86_64-apple-darwin13 library % conda install -c bioconda bioconductor-scran
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /Users/yaochung41/anaconda3/envs/scrnaseq

  added / updated specs:
    - bioconductor-scran


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    ca-certificates-2020.4.5.1 |       hecc5488_0         146 KB  conda-forge
    certifi-2020.4.5.1         |   py38h32f6830_0         151 KB  conda-forge
    ------------------------------------------------------------
                                           Total:         297 KB

The following packages will be UPDATED:

  bioconductor-scran bioconda/label/cf201901::bioconductor~ --> bioconda::bioconductor-scran-1.14.1-r36h6de7cb9_0
  ca-certificates                     2019.11.28-hecc5488_0 --> 2020.4.5.1-hecc5488_0
  certifi                         2019.11.28-py38h32f6830_1 --> 2020.4.5.1-py38h32f6830_0


Proceed ([y]/n)? y


Downloading and Extracting Packages
ca-certificates-2020 | 146 KB    | ##################################### | 100% 
certifi-2020.4.5.1   | 151 KB    | ##################################### | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
INFO: deactivate-gfortran_osx-64.sh made the following environmental changes:
-DEBUG_FFLAGS=-march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -isystem /Users/yaochung41/anaconda3/envs/scrnaseq/include -march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -Og -g -Wall -Wextra -fcheck=all -fbacktrace -fimplicit-none -fvar-tracking-assignments
-DEBUG_FORTRANFLAGS=-march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -isystem /Users/yaochung41/anaconda3/envs/scrnaseq/include -march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -Og -g -Wall -Wextra -fcheck=all -fbacktrace -fimplicit-none -fvar-tracking-assignments
-F77=/Users/yaochung41/anaconda3/envs/scrnaseq/bin/x86_64-apple-darwin13.4.0-gfortran
-F90=/Users/yaochung41/anaconda3/envs/scrnaseq/bin/x86_64-apple-darwin13.4.0-gfortran
-F95=/Users/yaochung41/anaconda3/envs/scrnaseq/bin/x86_64-apple-darwin13.4.0-gfortran
-FC=/Users/yaochung41/anaconda3/envs/scrnaseq/bin/x86_64-apple-darwin13.4.0-gfortran
-FFLAGS=-march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -isystem /Users/yaochung41/anaconda3/envs/scrnaseq/include
-FORTRANFLAGS=-march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -isystem /Users/yaochung41/anaconda3/envs/scrnaseq/include
-GFORTRAN=/Users/yaochung41/anaconda3/envs/scrnaseq/bin/x86_64-apple-darwin13.4.0-gfortran
(scrnaseq) yaochung41@x86_64-apple-darwin13 library % R

# 然后我嘗試使用library(scran)從 R 3.6.3 加載 package ,我也收到錯誤

Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.4.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(scran)
Loading required package: SingleCellExperiment
Loading required package: SummarizedExperiment
Loading required package: GenomicRanges
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: ‘BiocGenerics’

The following objects are masked from ‘package:parallel’:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from ‘package:stats’:

    IQR, mad, sd, var, xtabs

The following objects are masked from ‘package:base’:

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colnames, dirname, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
    pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table,
    tapply, union, unique, unsplit, which, which.max, which.min

Loading required package: S4Vectors

Attaching package: ‘S4Vectors’

The following object is masked from ‘package:base’:

    expand.grid

Loading required package: IRanges
Loading required package: GenomeInfoDb
Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: DelayedArray
Loading required package: matrixStats

Attaching package: ‘matrixStats’

The following objects are masked from ‘package:Biobase’:

    anyMissing, rowMedians

Loading required package: BiocParallel

Attaching package: ‘DelayedArray’

The following objects are masked from ‘package:matrixStats’:

    colMaxs, colMins, colRanges, rowMaxs, rowMins, rowRanges

The following objects are masked from ‘package:base’:

    aperm, apply, rowsum

Error: package or namespace load failed for ‘scran’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Users/yaochung41/anaconda3/envs/scrnaseq/lib/R/library/scran/libs/scran.dylib':
  dlopen(/Users/yaochung41/anaconda3/envs/scrnaseq/lib/R/library/scran/libs/scran.dylib, 6): Library not loaded: @rpath/libopenblasp-r0.3.7.dylib
  Referenced from: /Users/yaochung41/anaconda3/envs/scrnaseq/lib/R/library/scran/libs/scran.dylib
  Reason: image not found```


我遇到了您今天遇到的第二個錯誤,並且認為我已經找到了解決方法。

在做了一些挖掘之后,我發現我的問題是 openblas 而不是 SCRAN。 我的解決方法是:

$ conda install openblas=0.3.7

在您的文件中搜索“libopenblasp-r0.3.7”並將其復制到您正在使用的anaconda3環境的lib文件夾中,即/Users/yaochung41/anaconda3/envs/scrnaseq/lib/:

$ find /home/username/ -name libopenblasp-r0.3.7
$ mv [PATH to libopenblasp-r0.3.7] /Users/yaochung41/anaconda3/envs/scrnaseq/lib/

暫無
暫無

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

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