installConda: Install (Mini)conda

Description Usage Arguments Details Value Destruction of old instances Author(s) Examples

View source: R/installConda.R


Install conda - usually Miniconda, sometimes Anaconda - to an appropriate destination path, skipping the installation if said path already exists.


installConda(installed = TRUE)



Logical scalar indicating whether basilisk is already installed. Should only be set to FALSE in basilisk configure scripts.


This function was originally created from code in, also borrowing code from reticulate's install_miniconda for correct Windows installation. It downloads and runs an appropriate conda installer to create a conda instance for use by basilisk. We use BiocFileCache if available to avoid redownloading the installer upon basilisk re-installation.

Currently, we use version 4.8.3 of the Miniconda3 installer. On MacOS, this is followed by installation of nomkl package to avoid issues with notarization, see


A conda instance is created at the location specified by getCondaDir. Nothing is performed if a complete instance already exists at that location. A logical scalar is returned indicating whether a new instance was created.

Destruction of old instances

Whenever installConda is re-run (and BASILISK_USE_SYSTEM_DIR is not set, see ?getCondaDir), any previous conda instances and their associated basilisk environments are destroyed. This avoids duplication of large conda instances after their obselescence. Client packages are expected to recreate their environments in the latest conda instance.

Users can disable this destruction by setting the BASILISK_NO_DESTROY environment variable to "1". This may be necessary on rare occasions when running multiple R instances on the same Bioconductor release. Note that setting this variable is not required for R instances using different Bioconductor releases; the destruction is smart enough to only remove conda instances generated from the same release.


Aaron Lun


# We can't actually run installConda() here, as it 
# either relies on basilisk already being installed or
# it has a hard-coded path to the basilisk system dir.
print("dummy test to pass BiocCheck")

basilisk.utils documentation built on Jan. 29, 2021, 2 a.m.