Entering edit mode
18 months ago
Zhichao
•
0
I'm doing some bioinformatics analysis on a server running Ubuntu, and I use R in some workflow. The server administrator installed R for all users using apt. However, recently I encountered an issue where a R package couldn't be installed due to the high version of R. As a solution, I created a new environment using conda and installed a lower version of R. However, when I enter the R environment in the terminal, it still uses the high version of R installed via apt. How can I use the lower version of R installed through conda instead of the higher version installed via apt?
Did you activate your conda environment? Is conda in
PATH
? Please describe what you did.Edit: Generally, what I exclusively do these days is to run code and analysis via containers, such as Docker and Singularity, given that your server allows this. It's really convenient as you can freely build containers in a fixed environment (for example an Ubuntu container) so there is no issues with dependency installation etc, and it is even portable by pushing to Docker Hub. I personally was sick to always fight with compilation on my local machine, on the HPC, maybe another machine if the old one got replaced, Mac, Linux, Windows blabla. With Docker I run the same container everywhere. Amen :)
yes, I have activated this conda environment. And the conda is in
PATH
.At first, I create a new conda environment
conda create -n newR
.And then, activate this conda environment
conda activate newR
.I install the low version R in this conda environment
conda install -c conda-forge r-base=4.1.1
.Then, I input
R
in the terminal to enter the R in this conda environment.Please follow this sequence of steps and show us the outputs:
if you are doing these steps then the
R
version should be4.1.1
. Are you sure there weren't any errors during the install ofr-base=4.1.1
?