From 1c2334b44e2153a834b5cd795f391189da563580 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 30 Oct 2024 09:12:24 +0100 Subject: [PATCH] Update conda instructions to use miniforge and conda instead of mambaforge and mamba (#364) --- docs/sw_installation/conda_binaries.md | 31 ++++++++++---------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/docs/sw_installation/conda_binaries.md b/docs/sw_installation/conda_binaries.md index a631c72d8..65771cd1a 100644 --- a/docs/sw_installation/conda_binaries.md +++ b/docs/sw_installation/conda_binaries.md @@ -5,26 +5,24 @@ We provide binary packages for Linux, macOS and Windows of the software containe ## Install a conda distribution If you do not have a conda distribution on your system, we suggest to use the minimal -[`mambaforge`](https://github.com/conda-forge/miniforge#mambaforge) distribution, that uses `conda-forge` packages by default and installs the [`mamba`](https://github.com/mamba-org/mamba) command by default. - -To install `mambaforge`, please follow the instructions [`install-mambaforge`](https://github.com/robotology/robotology-superbuild/blob/master/doc/install-mambaforge.md) in robotology-superbuild documentation. - -Even if you are not using `mambaforge` and you are using instead a different `conda` distribution, to follow the instructions on this document you need to install the `mamba` package in your `base` environment. [`mamba`](https://github.com/mamba-org/mamba) is a re-implementation of some functionalities of the `conda` package manager, that is much faster. +[`miniforge`](https://github.com/conda-forge/miniforge) distribution, that uses `conda-forge` packages by default. +To install `miniforge`, please follow the instructions [`install-miniforge`](https://github.com/robotology/robotology-superbuild/blob/master/doc/install-miniforge.md) in robotology-superbuild documentation. ## Create an environment + Differently from `apt` and `homebrew`, the `conda` package manager is an `environment`-oriented package manager, meaning that packages are not installed in some global location, but rather you install packages in an `environment` (that is just a directory in your filesystem), so that you can easily have multiple different environments with different packages installed on your system. To read more about this, check https://docs.conda.io/projects/conda/en/4.6.1/user-guide/tasks/manage-environments.html . For this reason, to use the robotology conda packages it is suggested to first create a conda environment, and then install in it all the packages you want to use. To create a new environment called `robotologyenv`, execute the following command: ~~~ -mamba create -n robotologyenv +conda create -n robotologyenv ~~~ Once you created the `robotologyenv` environment, you can "activate" it for the current terminal (i.e. make sure that the installed packages can be found) by the command: ~~~ -mamba activate robotologyenv +conda activate robotologyenv ~~~ !!! note @@ -40,28 +38,23 @@ mamba activate robotologyenv Once you are in an activated environment, you can install robotology packages by just running the command: ~~~ -mamba install -c conda-forge -c robotology +conda install -c conda-forge -c robotology ~~~ -The list of available packages is available at https://anaconda.org/robotology/repo . +Some conda packages of software contained in the `robotology-superbuild` are contained in the `conda-forge` channel, while others in `robotology` channel. +When a package is available in both, the `conda-forge` channel contains the most updated version, so always ensure that the `conda-forge` channel as an higher priority w.r.t. to the `robotology` channel. For example, if you want to install yarp and icub-main, you simple need to install: ~~~ -mamba install -c conda-forge -c robotology yarp icub-main +conda install -c conda-forge -c robotology yarp icub-main ~~~ -In addition, if you want to simulate the iCub in Gazebo, you should also install `icub-models` and `gazebo-yarp-plugins`: +In addition, if you want to simulate the iCub in Gazebo Classic, you should also install `icub-models` and `gazebo-yarp-plugins`: ~~~ -mamba install -c conda-forge -c robotology gazebo-yarp-plugins icub-models +conda install -c conda-forge -c robotology gazebo-yarp-plugins icub-models ~~~ If you want to develop some C++ code on the top of these libraries, it is recommended to also install the necessary compiler and development tools directly in the same environment: ~~~ -mamba install -c conda-forge compilers cmake pkg-config make ninja -~~~ - -If you want instead install all the robotology distro just: - -~~~ -mamba install -c robotology robotology-distro +conda install -c conda-forge compilers cmake pkg-config make ninja ~~~