7  Miniconda

7.1 Installation steps

Miniconda is a free minimal installer for conda. It is a small, bootstrap version of Anaconda that includes only conda, Python, the packages they depend on, and a small number of other useful packages, including pip, zlib and a few others.

  • The following snippet will create a directory to install miniconda into:
mkdir /mnt/vdb/bin/miniconda3
  • Download the latest Miniconda installer for Linux:
sudo wget -P /mnt/vdb/bin/miniconda3/ https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
  • Change the directory:
cd /mnt/vdb/bin/miniconda3/
  • Make the installer script executable:
sudo chmod +x Miniconda3-latest-Linux-x86_64.sh
  • Run the installer script with root permissions:
sudo ./Miniconda3-latest-Linux-x86_64.sh
  • The installer will prompt you to accept the license agreement and select the installation directory. Press ‘ENTER’ to read the license and type ‘yes’ to accept it.

  • When asked for the installation directory, provide this custom path:

/mnt/vdb/miniconda3
  • The installer will install Miniconda and its dependencies. Once the installation is complete, it will ask if you want to initialize Miniconda3 by running conda init. Type ‘yes’ and press ‘ENTER’

  • Now we can remove the installer script

sudo rm -rf /bin/miniconda3/miniconda.sh
  • Open a new terminal to activate the changes.

  • Enter sudo su, that will open a shell as the superuser and activates the Miniconda base environment:

sudo su
  • We add the conda-forge channel (this is a community-led collection of recipes, build infrastructure and distributions for the conda package manager.):
conda config --add channels conda-forge