ImportError: no suitable backend found
Closed this issue · 7 comments
Hi Iñaki, @Enchufa2
I running into this error when running the following command on our bioconductor/bioconductor_docker:devel
container.
> install.packages("cli")
Error: cannot connect to the system package manager
Is there something that is required by bspm
that is not part of add_cranapt-jammy.sh to make the set up functional on an independent container?
I am using this Dockerfile:
FROM bioconductor/bioconductor_docker:devel
WORKDIR /home/rstudio
COPY --chown=rstudio:rstudio . /home/rstudio
ENV R_REMOTES_NO_ERRORS_FROM_WARNINGS=true
ENV CRAN='https://packagemanager.rstudio.com/cran/__linux__/jammy/latest'
COPY inst/scripts /home/rstudio/scripts
RUN bash ./scripts/add_cranapt_jammy.sh
RUN sudo R -f ./scripts/install_deps.R ## errors here
install_deps.R is a simple script that invokes the installation of packages needed for the workshop:
BiocManager::install(update = TRUE, ask=FALSE)
remotes::install_local(
dependencies = TRUE,
repos = BiocManager::repositories(),
build_vignettes = TRUE
)
Debugging
I was able to build the Docker container without the last command in the Dockerfile above and patch into the container and run the package installation command. This is the error produced from within bspm:::root_call
after slight modification of the stderr
argument:
Traceback (most recent call last):
File "/usr/local/lib/R/site-library/bspm/service/bspm.py", line 3, in <module>
import backend
File "/usr/local/lib/R/site-library/bspm/service/backend/__init__.py", line 15, in <module>
raise ImportError("no suitable backend found")
ImportError: no suitable backend found
This line requires a -y
. The same bug is present upstream, but probably the base image @eddelbuettel uses already has the required packages installed.
Actuallty, and while I could be wrong, I do not believe these BioConductor Docker images share any lineage with mine. As such maybe @LiNk-NY wants to use mine as baselines or comparison benchmarks possibly providing existence proofs.
Hi Iñaki @Enchufa2 and Dirk @eddelbuettel,
Thank you for the -y
tip! It worked.
The Bioconductor images are descendants of the rocker/rstudio
ones which as you may know include pandoc
and other tools. For now, I can work with this layer provided by your script and wait until the r2u
tooling has been integrated to the rocker images. I will certainly use your image for comparison benchmarks. Thanks!
Note rocker/rstudio is based on the versioned stack and that is fundementally incompatible with r2u.
We can (trivially) add the rstudio .deb to the other r2u or c2d4u based (non-RSPM) stacks.
I do not believe these BioConductor Docker images share any lineage with mine.
Correct, and that's why yours is working even if the command is incomplete: your base image already has python3-apt
installed.
Yes and no. 'Base image' really is rocker/r-base aka r-base and it does not.
r2u of course as it is bspm based, as is rocker/r-bspm (currently still using c2d4u, to be cleaned up).
To me, "base image" is still r-base as it is my fundamental building block (with Debian) and not part of the versioned stack (using Ubuntu and RSPM/PPM).
Closing here, fix sent as the PR above.