

プログラミング初心者です。  
minicondaを経由してJupyter notebook上でRを使った解析を行おうとしています。  
Rのカーネルの追加までは上手くいったのですが、Rパッケージを読み込もうとすると下記のようなエラーが出ます。  
何が原因でしょうか？

OSはmacOS10.15.2を使っています。  
pyenv1.2.15を使ってminiconda3-4.3.30を導入しています。

[code]

    library(DESeq2)
    
    Loading required package: S4Vectors
    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’:
    
        anyDuplicated, append, as.data.frame, basename, cbind, colnames,
        dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
        grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
        order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
        rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
        union, unique, unsplit, which, which.max, which.min
    
    
    Attaching package: ‘S4Vectors’
    
    The following object is masked from ‘package:base’:
    
        expand.grid
    
    Loading required package: IRanges
    Loading required package: GenomicRanges
    Loading required package: GenomeInfoDb
    Loading required package: SummarizedExperiment
    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
    
    Registered S3 methods overwritten by 'ggplot2':
      method         from 
      [.quosures     rlang
      c.quosures     rlang
      print.quosures rlang
    Error: package or namespace load failed for ‘DESeq2’ in dyn.load(file, DLLpath = DLLpath, ...):
      共有ライブラリ '/Users/naga/.pyenv/versions/miniconda3-4.3.30/envs/py2_bio/lib/R/library/DESeq2/libs/DESeq2.dylib' を読み込めません: 
      dlopen(/Users/naga/.pyenv/versions/miniconda3-4.3.30/envs/py2_bio/lib/R/library/DESeq2/libs/DESeq2.dylib, 6): Library not loaded: @rpath/libopenblasp-r0.3.7.dylib
      Referenced from: /Users/naga/.pyenv/versions/miniconda3-4.3.30/envs/py2_bio/lib/R/library/DESeq2/libs/DESeq2.dylib
      Reason: image not found 
    Traceback:
    
    1. library(DESeq2)
    2. tryCatch({
     .     attr(package, "LibPath") <- which.lib.loc
     .     ns <- loadNamespace(package, lib.loc)
     .     env <- attachNamespace(ns, pos = pos, deps, exclude, include.only)
     . }, error = function(e) {
     .     P <- if (!is.null(cc <- conditionCall(e))) 
     .         paste(" in", deparse(cc)[1L])
     .     else ""
     .     msg <- gettextf("package or namespace load failed for %s%s:\n %s", 
     .         sQuote(package), P, conditionMessage(e))
     .     if (logical.return) 
     .         message(paste("Error:", msg), domain = NA)
     .     else stop(msg, call. = FALSE, domain = NA)
     . })
    3. tryCatchList(expr, classes, parentenv, handlers)
    4. tryCatchOne(expr, names, parentenv, handlers[[1L]])
    5. value[[3L]](cond)
    6. stop(msg, call. = FALSE, domain = NA)
    
[/code]


CC BY-SA 4.0
2020-01-10T09:26:45.270
62132
2020-08-31T16:53:00.987
37404
question
r jupyter-notebook bioinformatics
Jupyter notebook上でRパッケージが読み込めない


エラーメッセージから察するに、OpenBLAS の shared library (libopenblasp-r0.3.7.dylib)
が見つからない様です。[この回答](https://stackoverflow.com/a/50634728) が参考になるかもしれません。

* * *

_この投稿は[@metropolis
さんのコメント](https://ja.stackoverflow.com/questions/62132/jupyter-
notebook%e4%b8%8a%e3%81%a7r%e3%83%91%e3%83%83%e3%82%b1%e3%83%bc%e3%82%b8%e3%81%8c%e8%aa%ad%e3%81%bf%e8%be%bc%e3%82%81%e3%81%aa%e3%81%84#comment67850_62132)
の内容を元に コミュニティwiki として投稿しました。_


CC BY-SA 4.0
2020-08-31T16:53:00.987
70024
2020-08-31T16:53:00.987
3060
62132
answer