Hello everyone, I need to set up a conda environment on my remote account. I am working on a remote server and my purpose is to be more flexible and independent in installing different software.
I thought the best way was to install Rstudio, R and its packages in the widest partition of my account. For this reason, I created a separate folder for my envs, then I searched on the internet and used these commands:
thoth> conda create -n r_env
thoth> conda activate r_env
(r_env) thoth> conda install -c conda-forge r-base=4.2.0
If I launched R the output shows that I installed the latest version. I need R 4.2.0 in order to run specific libraries on my scripts that are not supported by the previous versions.
R version 4.2.0 (2022-04-22) -- "Vigorous Calisthenics"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-conda-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
previous version.
However, I cannot find a way to install Rstudio.
thoth> conda install rstudio
generates the error
PackagesNotFoundError: The following packages are not available from current channels:
- python=3.1
and my current list of channels is:
thoth> conda config --show channels
channels:
- bioconda
- conda-forge
- r
- defaults
I tried also specifying r or conda-forge channels but the result is always the same.
My questions are:
1 - What is the mistake in my 'install' command? 2 - In general it is possible to run R 4.2 with Rstudio in a conda environment? I found also this issue between R 4.2 and Rstudio
The rstudio available via conda is usually really out of date. It's better to install it manually.
If I understand correctly, you want to install r-studio server on the remote server and then log into it from your desktop? I am not sure that it can be installed without root access. An r-studio server is a server process that needs to bind itself to a port. I found this, https://github.com/grst/rstudio-server-conda so maybe it can be done inside a container but that may not be accessible from the outside.
Hi Michael, I'm trying to install Rstudio for the desktop application, not the server. I don't have the right to install any software on the server department and the conda environment has been suggested as the best solution.
However, I understand the suggestion for the container solution.
Thanks.
Then I would simply download the binary from rstudio.com and use it with a local R installed via conda.
I personally use RStudio exclusively via Docker with the Bioconductor image which provides RStudio-Server out of the box. You can compile packages inside the container in a fixed reproducible environment and are independent of the host machine. This assumes though that Docker is available on that remote machine. If not then you might ask the admin to get RStudio running globally. You can then still install R itself via conda together with the packages and change the R installation that RStudio is supposed to use, see https://support.rstudio.com/hc/en-us/articles/200486138-Changing-R-versions-for-the-RStudio-Desktop-IDE