YuLab-SMU / clusterProfiler

:bar_chart: A universal enrichment tool for interpreting omics data
https://yulab-smu.top/biomedical-knowledge-mining-book/
967 stars 246 forks source link

Cannot library(clusterProfiler) #660

Closed HLinChen closed 5 months ago

HLinChen commented 5 months ago

Prerequisites

After I install clusterprofile by BiocManager::install("clusterProfiler"), I want to import the package. But I cannot. The error is:

library(clusterProfiler)

Error: package or namespace load failed for 'clusterProfiler' in inDL(x, as.logical(local), as.logical(now), ...): unable to load shared object 'D:/App/Miniconda/envs/r/lib/R/library/igraph/libs/x64/igraph.dll': LoadLibrary failure: 找不到指定的程序。

guidohooiveld commented 5 months ago

It looks you are using R installed through miniconda (thus a container), which I don't have experience with. Yet, based on the error its seems that the package igraph isn't installed/available in the environment. So I recommend to install that, and try again. Or just run R/Bioconductor directly (thus not through a containerized version)...

BTW, I recommend to install igraph, available at CRAN, also through BiocManager (since then all dependencies are checked). Copy/paste:

if (!require("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

BiocManager::install("igraph")
HLinChen commented 5 months ago

Thank you for your help! I have solved this problem by using the newest R and corresponding clusterProfiler package.