Error When Using biocLite as an installer in rpy2 python library I am running into an error when I tried to run the following lines of code, the error at line 3:
1 from rpy2.robjects.packages import importr
2 base = importr('base')
3 base.source(&quot;http://www.bioconductor.org/biocLite.R&quot;)
4 biocinstaller = importr(&quot;BiocInstaller&quot;)
5 biocinstaller.biocLite(&quot;seqLogo&quot;)

rpy2.rinterface_lib.embedded.RRuntimeError: Error: With R version 3.5 or greater, install Bioconductor packages using BiocManager; see https://bioconductor.org/install
How can I use BiocManager installer instead of biocLite  and reflect that on my code? I couldn't find any documentation or source that talk about this error from within Python.
Thank you in advance
You're using an outdated version of R. You can use the R 4.0 from conda-forge channel, just create an environment with r-base and then install rpy2, the latest version compatible with R 4.0 is available through pip
conda create -n rpy2 -c conda-forge r-base
conda activate rpy2
pip install rpy2

Now you can use rpy2 with R 4.0 in your python code.
import rpy2.robjects as robjects
robjects.r('install.packages(&quot;BiocManager&quot;, '
           'repos=&quot;http://cran.r-project.org&quot;)')
robjects.r('BiocManager::install(&quot;seqLogo&quot;)')
robjects.r('library(seqLogo)')

Remember deactivate your env with conda deactivate.