Hi, newbie here. When I try to start my binder with R using either install.R or DESCRIPTION I get an apt-get error below:
The following packages have unmet dependencies:
r-base : Depends: r-recommended (= 3.6.1-3bionic) but 3.6.2-1bionic is to be installed
Recommends: r-base-html but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Removing intermediate container 7aa83b36947a
The command '/bin/sh -c apt-get update && apt-get install --yes r-base=3.6.1-3bionic r-base-dev=3.6.1-3bionic libclang-dev && apt-get -qq purge && apt-get -qq clean && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
I separately paralleled the runtime and install file you used (assuming the repo I pointed at above was indeed the issue) and was finding it works, see here. Then I tried yours from that repo above and it worked too. However, upon further testing mine suddenly stopped working without me re-committing and I saw that exact error you reported. I tested some more and I am fairly confident at this point it is an issue with where these R-based repos are getting built/launched in the public Binderhub federation. I’ll privately send you a work around if you’d like while I try to discuss it with the MyBinder folks.
Hi, also new to binder and running into the same issue with either the install.R or DESCRIPTION file options. Would you share your work-around? Thank you!
In regards to this discourse post, I had endeavored to send the temporary work-around to @kozo2; however, it appears the Binder federation member server I was using as a work-around has been updated now and fails to build.
I am going to update the Github issue I posted about this with the current information.
For R-based notebooks and RStudio based ones, I think I may have a new work-around to offer. The install.R file will still work; however, you have to switch to using a Dockerfile instead of runtime. Example work-in-progess is here . However, @aciobanusebi , it doesn’t seem to work with RShiny .
Hi! I’m getting an error with the same package, but in a different context, and I’m posting here because I think it may be related. I’m trying to have Python and R run on the same Jupyter notebook (with rpy2 interface) and I’m trying to install additional R packages not available on conda with an install.R file. But when I try to set up a Binder (repository https://github.com/nkanrar/SURF2020.git) I get the following error:
"PackagesNotFoundError: The following packages are not available from current channels:
r-base=3.6.1-3bionic"
This post the only place where I’ve seen anything remotely similar pop up, so I thought I’d share here. I’d appreciate any help, thanks!
Were things working before you added runtime.txt and install.R?
It looks like you may be doing what here advised not to do, namely combining the approaches? The page there says you can use postBuild to install packages from other sources but doesn’t show an example. Maybe post an issue and ask for guidance so you could add an example? (That repo is sort of new and I haven’t stumbled upon the way to do it.)
Or you can go the other way and try the example based on here? Can most be moved to apt.txt? The pip installable stuff can be moved to requirements.txt (see discussion here at Aug 15 2018 13:42 timestamp), and things like r-xml moved to install.R (I think based on here).
Yes, things were working before I added runtime.txt and install.R, sorry for not clarifying earlier. I will definitely post an issue where you suggested, but I had to combine approaches because some R packages are not available on anaconda and/or are not up to date on anaconda.
I guess I tried this approach based on this example here, but the R and Python kernels are separate in Jupyter notebook (I’d want them to run in the same kernel). I’ll update here if I can get a workaround.
Thanks for your other suggestions, I’ll definitely explore them.
Good find. I was trying to find something like that r_with_python repo . Good example. Note how the environment.yml file there doesn’t have anything involving R? That was what I was trying to get you to move towards. Then maybe your current combined approach might work. I believe you need to get all the stuff dealing with R out of of environment.yml into the install.R.
As that documentation I referenced suggested, you cannot just take the working conda approach and add install.R for the few outlier packages you need. You have to shift the R-related aspect of your approach.
I think posting an issue at the ‘r-conda’ repo is a good idea. If there is a way to cover what you had hoped to initially add with install.R with postBuild in combination with the ‘r-conda’ approach that would be nice to see illustrated there. I’m not well versed enough in R to know the way to do it.