text: user2005: 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.
  
  user240: Sounds like you might have an issue with which R Rstudio is running.
  If you didn't install Rstudio through conda, Rstudio may be using its own version of R that is bundled with Rstudio, instead of the one you've installed via conda.
  Assuming that your conda environment name is renv, try running this in the terminal:
  $ conda activate renv
  $ conda install r::rstudio -y
  
  $ which rstudio
  /Users/nikitavlasenko/miniconda3/envs/renv/bin/rstudio
  # or something like this ^
  
  # run Rstudio as a background shell process
  rstudio &
  
  This should open up the Rstudio interface, like normal, but using everything defined in your renv environment.
  If you try loading the DEseq2 library now, that might work.
  
  user3499: As others have mentioned, this is likely an issue with having multiple versions of R or RStudio installed.
  I highly recommend that any R/RStudio version not installed inside conda be removed. This includes any installed libraries. 
  I've previously written a blog post about this topic, and I can say from experience that installing R packages through conda can cause lots of headaches. 
  You'll have an easier time if you install R/RStudio via conda and then install R packages the traditional way, inside R/RStudio.
  So, for example. 
  Bad: conda install -c bioconda bioconductor-deseq2
  Good: 
  conda install rstudio
  # Then, inside RStudio
  source("https://bioconductor.org/biocLite.R")
  biocLite("DESeq2")
  
  
  user2005: 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.
  
original_text: 2005: <p>I tried running <code>conda install -c bioconda bioconductor-deseq2</code> in a <code>conda</code> environment, but when I run <code>R</code> console and try to import <code>DESeq2</code> I am getting the error message:</p>
  
  <blockquote>
    <p>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</p>
  </blockquote>
  
  <p>When I try installing <code>GenomeInfoDbData</code> and <code>GenomeInfoDb</code> using <code>conda</code>, it says that the packages were already installed. If I run <code>install.packages(GenomeInfoDb)</code> from <code>R</code> console, it is telling me that the package is not available for <code>R</code> version <code>3.5.1</code>. </p>
  
  <p>I want to import <code>DESeq2</code> in <code>Rstudio</code> though and it is giving me a different error when I try importing <code>DESeq2</code>:</p>
  
  <blockquote>
    <p>Error in library("DESeq2") : there is no package called ‘DESeq2’</p>
  </blockquote>
  
  <p>I do not get why <code>Rstudio</code> does not see that I alrerady installed <code>DESeq2</code> with <code>conda</code>. If I try running <code>biocLite("DESeq2")</code> from <code>Rstudio</code> I get the following error:</p>
  
  <blockquote>
    <p>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’</p>
  </blockquote>
  
  <p>So, supposedly the issue is with <code>Hmisc</code>. I installed the package successfully with <code>conda</code>, but <code>Rstudio</code> is apparently does not know about it. Running <code>install.packages("Hmisc")</code> gives the first part of the error with missing <code>cluster.so</code> library.</p>
  
  <p>Any suggestions would be greatly appreciated.</p>
   240: <p>Sounds like you might have an issue with which <code>R</code> Rstudio is running.
  If you didn't install Rstudio through <code>conda</code>, Rstudio may be using its own version of <code>R</code> that is bundled with Rstudio, instead of the one you've installed via <code>conda</code>.</p>
  
  <p>Assuming that your <code>conda</code> environment name is <code>renv</code>, try running this in the terminal:</p>
  
  <pre><code><span class="math-container">$ conda activate renv
  $</span> conda install r::rstudio -y
  
  $ which rstudio
  /Users/nikitavlasenko/miniconda3/envs/renv/bin/rstudio
  # or something like this ^
  
  # run Rstudio as a background shell process
  rstudio &amp;
  </code></pre>
  
  <p>This should open up the Rstudio interface, like normal, but using everything defined in your <code>renv</code> environment.</p>
  
  <p>If you try loading the <code>DEseq2</code> library now, that might work.</p>
   3499: <p>As others have mentioned, this is likely an issue with having multiple versions of R or RStudio installed.</p>
  
  <p>I highly recommend that any R/RStudio version not installed inside conda be removed. This includes any installed libraries. </p>
  
  <p>I've previously written a <a href="https://jlboat.github.io/how-to-set-up-a-bioinformatics-environment.html" rel="nofollow noreferrer">blog post</a> about this topic, and I can say from experience that installing R packages through conda can cause lots of headaches. </p>
  
  <p>You'll have an easier time if you install R/RStudio via conda and then install R packages the traditional way, inside R/RStudio.</p>
  
  <p>So, for example. </p>
  
  <p>Bad: <code>conda install -c bioconda bioconductor-deseq2</code></p>
  
  <p>Good: </p>
  
  <pre><code>conda install rstudio
  # Then, inside RStudio
  source("https://bioconductor.org/biocLite.R")
  biocLite("DESeq2")
  </code></pre>
   2005: <p>Ultimately my colleague helped me to solve the issue by following the steps:</p>
  
  <ol>
  <li>Created environment: <code>conda create --name myenv</code></li>
  <li>Activated it: <code>source activate myenv</code></li>
  <li>Edited <code>.condarc</code> to set the priority of the channels to be the following (top to bottom): <code>conda-forge</code>, <code>bioconda</code>, <code>r</code>, <code>default</code></li>
  <li>Checked that the channels are set in the correct order: <code>conda config --get channels</code></li>
  <li><code>conda install r=3.5.1</code></li>
  <li><code>conda install r-essentials</code></li>
  <li><code>conda install rstudio</code></li>
  <li>Installation of all of the <code>bioconductor</code> packages through <code>bioconda</code> and never install anything from inside <code>R</code> or <code>Rstudio</code> (I guess that is how it was broken)</li>
  </ol>
  
  <p>Then launching <code>rstudio</code> 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.</p>
  