Last Updated: May 2023
This guide provides tips for using Conda effectively in your Tethys environment.
All of the dependencies for Tethys Platform are installed from the
conda-forge channel (see: Conda-Forge). We recommend that you install any additional packages that you need for development from
conda-forge as well to ensure compatibility with the dependencies already installed. To do so, provide the
-c option when installing packages:
conda install -c conda-forge <package>
You may wish to configure your conda environment to automatically install packages from the
conda-forge channel as follows:
conda config --add channels conda-forge
This command will add the
conda-forge channel to the top of the channel list, making it the highest priority channel for retrieving packages. To learn more see Conda User Guide - Manage channels.
The default solver for Conda is notoriously slow, especially in environments that have a lot of dependencies. Tethys development environments can accumulate dependencies as you install more packages and more apps.
libmamba solver is a much more efficient solver for Conda and is recommended when you run into issues where your environment is taking too long to solve or fails to solve (see: A Faster Solver for Conda: Libmamba). Follow the steps below to use the
libmamba solver with Tethys Platform.
libmambain base environment:
conda update -n base conda
conda install -n base conda-libmamba-solver
Optionally, you may wish to set the
libmambasolver as the default solver:
conda config --set solver libmamba
To install Tethys Platform using the
libmamba solver, run the command with the
conda create --solver libmamba -n tethys -c tethysplatform -c conda-forge tethys-platform
Alternatively, if you set
libmamba to be the default solver in step 2, run the install command as usual and
libmamba will be used automatically:
conda create -n tethys -c tethysplatform -c conda-forge tethys-platform
You can also use the
--solver option to install new packages in the Tethys environment. Don't forget to activate the Tethys environment first:
conda activate tethys
conda install --solver libmamba -c conda-forge <package>
tethys install command that is used to install apps, also installs dependencies of the app that are listed in its
tethys install command will use the default solver you have configured. So to install app dependencies using the
libmamba solver, set the default solver to be
libmamba (see above) and then run the
tethys install command as usual.