| Both sides previous revisionPrevious revision | |
| other:uvcdat:cdat_conda:miniforge_install [2025/10/06 16:18] – [Miniforge3 on a Windows computer] Improved jypeter | other:uvcdat:cdat_conda:miniforge_install [2025/10/06 16:54] (current) – [Why should you use Miniconda3 ?] Updated version, now that we use miniforge instead of miniconda jypeter |
|---|
| * and an existing Python environment on this cluster providing all the packages you need | * and an existing Python environment on this cluster providing all the packages you need |
| **but** this Python environment is not directly available on the notebook server (i.e. not listed in the //kernels// pull-down menu), you should follow the [[other:python:starting#using_a_non-standard_kernel|using a non-standard kernel]] instructions, rather than starting your own local notebook server (on this multi-user computer) | **but** this Python environment is not directly available on the notebook server (i.e. not listed in the //kernels// pull-down menu), you should follow the [[other:python:starting#using_a_non-standard_kernel|using a non-standard kernel]] instructions, rather than starting your own local notebook server (on this multi-user computer) |
| ===== Why should you use Miniconda3 ? ===== | ===== Why should you use Miniforge3 ? ===== |
| |
| FIXME: try using [[https://conda-forge.org/download/|Miniforge3]] instead of Miniconda3 ? | <note tip> |
| | * **You should use [[https://conda-forge.org/download/|Miniforge3]]** instead of ''Miniconda3'' or ''Anaconda3'' because it is not provided by the Anaconda company and is **completely free** |
| | * Check the [[https://www.anaconda.com/legal|Anaconda Legal]] page for more details |
| | * People with an existing ''Miconconda3'' based installation can have a look at the old [[other:uvcdat:cdat_conda:miniconda3_install|JYP steps for installing Miniconda3]] page |
| | </note> |
| |
| * **//Miniconda3// is a minimal/bootstrap Python distribution** that can be used for creating more complex Python distributions.\\ It will basically make a recent ''conda'' command/executable available on your computer, and you can then use this ''conda'' executable to select an existing distribution, or create new and independent Python distributions. | * **//Miniforge3// provides a free minimal/bootstrap Python distribution** that can be used for creating more complex Python distributions.\\ It will basically make a recent ''conda'' command/executable available on your computer, and you can then use this ''conda'' executable to create new and independent Python distributions, or select an existing distribution. |
| |
| * A **conda //environment//** is basically (the short name of the directory) where you install the Python that you will use (independently of //Miniconda3// itself). You have to ''activate'' this environment in order to use it\\ \\ A **Python //distribution//** is the collection of packages (and their dependencies) you have chosen to install together in a given environment. | * A **conda //environment//** is basically (the short name of the directory) where you install the Python that you will use (independently of //Miniforge3// itself). You have to ''activate'' this environment in order to use it\\ \\ A **Python //distribution//** is the collection of packages (and their dependencies) you have chosen to install together in a given environment. |
| * Example: initializing an environment named ''cdatm_py3'' (assuming it exists) in a //bash// shell <code>$ source /path_to_miniconda/etc/profile.d/conda.sh | * Example: initializing an environment named ''cdatm_py3'' (assuming it exists) in a //bash// shell <code>$ source /path_to_miniforge/etc/profile.d/conda.sh |
| |
| $ which conda | $ which conda |
| /path_to_miniconda/condabin/conda | /path_to_miniforge/condabin/conda |
| |
| $ conda env list | $ conda env list |
| [...] | [...] |
| cdatm_py3 /path_to_miniconda/envs/cdatm_py3 | cdatm_py3 /path_to_miniforge/envs/cdatm_py3 |
| some_other_env /path_to_miniconda/envs/some_other_env | some_other_env /path_to_miniforge/envs/some_other_env |
| |
| $ conda activate cdatm_py3 | $ conda activate cdatm_py3 |
| |
| (cdatm_py3) $ which python | (cdatm_py3) $ which python |
| /path_to_miniconda/envs/cdatm_py3/bin/python | /path_to_miniforge/envs/cdatm_py3/bin/python |
| </code> | </code> |
| * The //special// environment where //Miniconda3// itself is installed is called ''base'' (it also used to be called ''root''). Note that the ''python'' binary of the //special// ''base'' environment is not located in the same directory hierarchy as the ''python'' of the other environments (i.e. there is no ''envs/'' subdirectory<code>$ conda activate base | * The //special// environment where //Miniforge3// itself is installed is called ''base'' (it also used to be called ''root''). Note that the ''python'' binary of the //special// ''base'' environment is not located in the same directory hierarchy as the ''python'' of the other environments (i.e. there is no ''envs/'' subdirectory<code>$ conda activate base |
| |
| (base) $ which python | (base) $ which python |
| /path_to_miniconda/bin/python | /path_to_miniforge/bin/python |
| </code> | </code> |
| |
| * You **don't need to be (and you should not be !!) //root//** when you install //Miniconda3//. You just **need //enough// disk space** on a disk where you have write access | * You **don't need to be (and you should not be !!) //root//** when you install //Miniforge3//. You just **need //enough// disk space** on a disk where you have write access |
| * **WARNING**: by default, //Miniconda3// will install itself and subsequent Python environments in a sub-directory of your home directory (''~/miniconda3'' on Linux). **Do not use the default installation location**, if you want to avoid disk space related problems (//disk full//, //quota exceeded//, ...) during the inittial installation or later | * **WARNING**: by default, //Miniforge3// will install itself and subsequent Python environments in a sub-directory of your home directory (''~/miniforge3'' on Linux). **Do not use the default installation location**, if you want to avoid disk space related problems (//disk full//, //quota exceeded//, ...) during the initial installation or later |
| * **WARNING**: older versions of //Miniconda3// used a **hidden sub-directory** of the home directory of the person installing //Miniconda3// (''~/.conda'' on Linux) | * **WARNING**: older versions of //Miniforge3// used a **hidden sub-directory** of the home directory of the person installing //Miniforge3// (''~/.conda'' on Linux) |
| * Choose carefully where you will install //Miniconda3//, because the size of the installation directory will start at a few Gb and will keep on growing | * Choose carefully where you will install //Miniforge3//, because the size of the installation directory will start at a few Gb and will keep on growing |
| | |
| * You //could// also start with the full //Anaconda// (instead of //Miniconda//) installer, that will install a much more complete python environment, ready for use.\\ **We choose not to use the full //Anaconda// installer** because: | |
| * It requires more disk space than //Miniconda3// during the initial installation, | |
| * All the //Anaconda// installer packages come from the ''default'' //channel// (or //repository//) provided by the [[https://anaconda.org/|conda repository]].\\ This is not very useful for us (and could even cause complex dependency problems later) because we will be mostly using (the same) packages provided by the [[https://conda-forge.org/feedstock-outputs/|conda-forge]] //channel//, **in order to avoid complex package dependency problems** | |
| |
| |