How to select a CRAN mirror in conda-build?

0 views
Skip to first unread message

Marek Gierliński

unread,
Apr 23, 2018, 6:37:40 AM4/23/18
to conda - Public
I'm trying to install R package kableExtra in my environment:

conda skeleton cran kableextra
conda-build --R 3.4.2 r-kableextra

Every time I do this I get an error message:


There is a cran_mirror variable in the r-kableextra/meta.yaml file and, in this case, it defaults to https://mran.microsoft.com/snapshot/2018-01-01/. Alas, the package is not found there.

I couldn't find any way of changing this variable via conda-build or conda skeleton parameters, so I had to edit the meta.yaml file and manually replaced {{ cran_mirror }} with https://cran.r-project.org. This solved the problem.

How do I select CRAN mirror without editing the meta.yaml file?

Ray Donnelly

unread,
Apr 23, 2018, 6:44:26 AM4/23/18
to Marek Gierliński, conda - Public
An alternative is to pass --cran-url when you call conda skeleton cran, e.g. with  https://mran.microsoft.com/snapshot/2018-01-01/

We've switched to MRAN since it provides snapshotting which is a very useful feature for reproducibility.

--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+un...@continuum.io.
To post to this group, send email to co...@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/conda/3cee2b71-53b8-4ab8-af0c-05f17253efd1%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Marek Gierliński

unread,
Apr 23, 2018, 6:51:27 AM4/23/18
to Ray Donnelly, conda - Public
I believe I tried this, but the resulting meta.yaml file still contained cran_mirror variable.

I will try the other method.

Thanks a lot!

Marek
--
Dr Marek Gierliński
The Data Analysis Group
The Barton Group
Computational Biology and GRE
School of Life Sciences
University of Dundee, Dundee, Scotland, UK.
Tel: +44 1382 386427
www.compbio.dundee.ac.uk/dag.html

--- Ceterum censeo stultitiam esse delendam ---

Ray Donnelly

unread,
Apr 23, 2018, 6:58:20 AM4/23/18
to Marek Gierliński, conda - Public
It *will* contain the variable, that's never expanded, however when it looks up the versions available it will check MRAN and not CRAN then when conda-build defaults to looking on MRAN too it will find that version.
Reply all
Reply to author
Forward
0 new messages