User Tools

Site Tools


other:uvcdat:cdat_conda:miniconda3_install

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
other:uvcdat:cdat_conda:miniconda3_install [2021/03/08 20:27]
jypeter [Changing the .condarc file]
other:uvcdat:cdat_conda:miniconda3_install [2021/03/09 10:40]
jypeter [Changing the .condarc file]
Line 15: Line 15:
   * You could also start with the //​Anaconda//​ installer that will install a much more complete python environment,​ ready for use, but we choose not to do that because Anaconda requires more disk space at the beginning, and all its packages come from the ''​default''​ //channel// (or //​repository//​) provided by the [[https://​docs.conda.io/​projects/​conda/​en/​latest/​glossary.html#​conda-repository|conda repository]]. This is not very useful because we will be mostly using (the same) packages provided by the [[https://​conda-forge.org/​feedstock-outputs/​|conda-forge]] channel.   * You could also start with the //​Anaconda//​ installer that will install a much more complete python environment,​ ready for use, but we choose not to do that because Anaconda requires more disk space at the beginning, and all its packages come from the ''​default''​ //channel// (or //​repository//​) provided by the [[https://​docs.conda.io/​projects/​conda/​en/​latest/​glossary.html#​conda-repository|conda repository]]. This is not very useful because we will be mostly using (the same) packages provided by the [[https://​conda-forge.org/​feedstock-outputs/​|conda-forge]] channel.
  
-Note: some extra details are available on the much older page //​Installing and maintaining UV-CDAT with conda//. You can check later the [[other:​uvcdat:​conda_notes#​useful_conda_commands|Useful conda commands]], but the [[https://​docs.conda.io/​projects/​conda/​en/​latest/​index.html|official conda documentation]] ​is probably more up-to-date+Note: some extra details are available on the much older page //​Installing and maintaining UV-CDAT with conda//. You can check later the [[other:​uvcdat:​conda_notes#​useful_conda_commands|Useful conda commands]], but the [[https://​docs.conda.io/​projects/​conda/​en/​latest/​index.html|official conda documentation]] ​and the [[https://​docs.conda.io/​projects/​conda/​en/​latest/​user-guide/​cheatsheet.html|Cheat sheet]] are probably more up-to-date.
  
 ===== Installing miniconda3 on a Linux-like computer ===== ===== Installing miniconda3 on a Linux-like computer =====
Line 110: Line 110:
 ===== Fine-tuning conda ===== ===== Fine-tuning conda =====
  
-conda will probably work fine with the default settings, but we intend to create complex environments and it is better ​to use some specific settings+conda will probably work fine with the default settings ​for creating new environments with just one package (e.g. [[https://​github.com/​NOAA-PMEL/​PyFerret/#​anaconda-installation---linux-os-x-and-windows-10bash|just PyFerret]]). 
 + 
 +We intend to **create complex environments** (combining lots of packages, with complex dependencies) ​and it is highly recommended ​to use the specific settings ​described in this section 
 + 
 +==== Getting conda configuration information ====
  
   * [[https://​docs.conda.io/​projects/​conda/​en/​latest/​commands/​config.html|conda config]] documentation   * [[https://​docs.conda.io/​projects/​conda/​en/​latest/​commands/​config.html|conda config]] documentation
Line 120: Line 124:
 Most of the packages we will install will be provided by the //​conda-forge//​ channel (''​-c conda-forge''​ option). The installation steps will also add dependencies that will theoretically come from //​conda-forge//,​ but could also come from the //​defaults//​ channel. Most of the packages we will install will be provided by the //​conda-forge//​ channel (''​-c conda-forge''​ option). The installation steps will also add dependencies that will theoretically come from //​conda-forge//,​ but could also come from the //​defaults//​ channel.
  
-The following will **make sure that we only get packages from //​conda-forge//​** (see [[https://​docs.conda.io/​projects/​conda/​en/​latest/​user-guide/​tasks/​manage-channels.html|Managing channels]] and [[https://​conda-forge.org/​docs/​user/​tipsandtricks.html#​how-to-fix-it|Using multiple channels => How to fix it]])+The following will **make sure that we only get packages from //​conda-forge//​** ​unless the requested packages really don't exist on //​conda-forge// ​(see [[https://​docs.conda.io/​projects/​conda/​en/​latest/​user-guide/​tasks/​manage-channels.html|Managing channels]] and [[https://​conda-forge.org/​docs/​user/​tipsandtricks.html#​how-to-fix-it|Using multiple channels => How to fix it]])
  
 <​code>​$ conda config --add channels conda-forge <​code>​$ conda config --add channels conda-forge
 $ conda config --set channel_priority strict $ conda config --set channel_priority strict
-$ cat .condarc+$ cat ~/.condarc
 channels: channels:
   - conda-forge   - conda-forge
   - defaults   - defaults
 channel_priority:​ strict</​code>​ channel_priority:​ strict</​code>​
 +
 +==== Using mamba instead of conda ====
 +
 +Even when using a proper ''​.condarc''​ in order to get packages coming only from //​conda-forge//,​ ''​conda install''​ may fail to solve the dependencies after meditating during an enormous time, when we specify **complex environments**. Using CDAT as a base environment,​ and adding a lot of extra packages is a complex environment.
 +
 +The only solution seems to replace ''​conda''​ with [[https://​github.com/​mamba-org/​mamba|mamba]],​ a reimplementation of the conda package manager in C++ ([[https://​wolfv.medium.com/​making-conda-fast-again-4da4debfb3b7|Making conda fast again]])
  
  
other/uvcdat/cdat_conda/miniconda3_install.txt · Last modified: 2024/06/28 12:10 by jypeter