Search code examples
ranacondarstudioconda

Can't install recent version of Rstudio in Ubuntu 22.04 through anaconda


When tried to install through terminal command:

conda install -c r rstudio

The terminal got stuck in solving environmental step forever. I manually killed the process.

Then I tried to install Rstudio from anaconda-navigator by creating a new environment for R and python 3.7. The only available (listed) Rstudio version were from 1.0.44 and 1.1.456. I can install version 1.0.44 but not 1.1.456. Greater issue for me that the latest versions are not even listed.


Solution

  • Don't use the r channel - Anaconda has not kept up maintenance on it. Instead, use Conda Forge. Also, I would strongly discourage installing anything R in an Anaconda base environment or any other environment that has Python installed. Instead, create a new one:

    conda create -n rstudio -c conda-forge rstudio-desktop r-base=4.1
    

    Specifying the r-base, which controls the version, is optional but recommended. This should work for either 4.0 or 4.1.


    Additional Commentary

    I'm a strong advocate of keeping infrastructure and execution environments separated. This allows one to keep updating them independent. Unlike Jupyter, RStudio still doesn't have clean way to load Conda R environments. For that reason, I still recommend using a native RStudio installation, as described in this answer.