Install DESeq2 through anaconda I tried running conda install -c bioconda bioconductor-deseq2 in a conda environment, but when I run R console and try to import DESeq2 I am getting the error message:


  Error: package or namespace load failed for ‘GenomeInfoDb’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
   there is no package called ‘GenomeInfoDbData’
  Error: package ‘GenomeInfoDb’ could not be loaded


When I try installing GenomeInfoDbData and GenomeInfoDb using conda, it says that the packages were already installed. If I run install.packages(GenomeInfoDb) from R console, it is telling me that the package is not available for R version 3.5.1. 

I want to import DESeq2 in Rstudio though and it is giving me a different error when I try importing DESeq2:


  Error in library("DESeq2") : there is no package called ‘DESeq2’


I do not get why Rstudio does not see that I alrerady installed DESeq2 with conda. If I try running biocLite("DESeq2") from Rstudio I get the following error:


  Error in dyn.load(file, DLLpath = DLLpath, ...) : 
    unable to load shared object '/Users/nikitavlasenko/miniconda3/envs/renv/lib/R/library/cluster/libs/cluster.so':
    dlopen(/Users/nikitavlasenko/miniconda3/envs/renv/lib/R/library/cluster/libs/cluster.so, 6): Symbol not found: _libintl_dgettext
    Referenced from: /Users/nikitavlasenko/miniconda3/envs/renv/lib/R/library/cluster/libs/cluster.so
    Expected in: /Users/nikitavlasenko/miniconda3/envs/renv/lib/R/lib/libR.dylib
   in /Users/nikitavlasenko/miniconda3/envs/renv/lib/R/library/cluster/libs/cluster.so
  ERROR: lazy loading failed for package ‘Hmisc’
  * removing ‘/Users/nikitavlasenko/miniconda3/envs/renv/lib/R/library/Hmisc’
  ERROR: dependency ‘Hmisc’ is not available for package ‘DESeq2’
  * removing ‘/Users/nikitavlasenko/miniconda3/envs/renv/lib/R/library/DESeq2’


So, supposedly the issue is with Hmisc. I installed the package successfully with conda, but Rstudio is apparently does not know about it. Running install.packages("Hmisc") gives the first part of the error with missing cluster.so library.

Any suggestions would be greatly appreciated.
Ultimately my colleague helped me to solve the issue by following the steps:


Created environment: conda create --name myenv
Activated it: source activate myenv
Edited .condarc to set the priority of the channels to be the following (top to bottom): conda-forge, bioconda, r, default
Checked that the channels are set in the correct order: conda config --get channels
conda install r=3.5.1
conda install r-essentials
conda install rstudio
Installation of all of the bioconductor packages through bioconda and never install anything from inside R or Rstudio (I guess that is how it was broken)


Then launching rstudio from within the environment. Maybe it is not a kind of quick fix and it could have been solved easier, but I was not able to.