Jupyter notebook with rpy2 RMagic can't find a bioconductor library

9 views
Skip to first unread message

Arnaud Mounier

unread,
Nov 23, 2020, 10:25:39 AM11/23/20
to Anaconda - Public
Hello,
I have a env with a ipython kernel 3.6 and R, some R packages and the bridge for this 2 languages rpy2. In the notebook, I load the extension rpy2.ipython.

I have to load 2 library from R in a notebooks : tidyverse and dada2. Tidyverse come from a regular anaconda r channel whereas dada2 come from bioconductor. This 2 packages are both in /opt/conda/envs/my_env/lib/R/library but when I try to load it tidyverse works fine but the system say it can't find dada2 and I don't know why.

%%R
library(dada2)
R[write to console]: Error in library(dada2) : aucun package nommé ‘dada2’ n'est trouvé

Have I miss a configuration in the notebook ?

Thank you,
arnome.

Arnaud Mounier

unread,
Nov 24, 2020, 9:09:42 AM11/24/20
to Anaconda - Public, Arnaud Mounier
Hello,

I find the error, the R_HOME env variable was wrong (/usr/lib/R) and I change it like this :
os.environ['R_HOME'] = "/opt/conda/envs/<my_env>/lib/R"
before load the extention rp2.extension

arnome.
Reply all
Reply to author
Forward
0 new messages