User Tools

Site Tools


other:uvcdat:cdat_conda:miniforge_install

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
other:uvcdat:cdat_conda:miniforge_install [2025/10/01 16:19] – [Miniforge3 on a Windows computer] Improved jypeterother: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
Line 10: Line 10:
 ==== Desperately seeking a specific package ==== ==== Desperately seeking a specific package ====
  
-Check if the Python package you are [[https://www.imdb.com/title/tt0089017/|desperately seeking]] is not already installed, before installing your own Python environment **on shared interactive Linux servers, or on batch computing clusters** !!+**Before** installing your own Python environment, check if the Python package you are [[https://www.imdb.com/title/tt0089017/|desperately seeking]] is not already available in an existing Python distribution on the  **shared interactive Linux servers**, or the **batch computing clusters** you have access to !!
  
-  * Ask other users who know the local environment+<wrap hi>Do not reinvent the wheel and waste shared disk space</wrap> 
 + 
 +  * Ask other users who know the local environments
  
   * Read the servers/clusters Python-related documentation: [[https://wiki.lsce.ipsl.fr/pmip3/doku.php/other:python:starting|Python at LSCE by JYP]], [[https://intranet.lsce.ipsl.fr/informatique/index.php|LSCE]], [[https://documentations.ipsl.fr/spirit/spirit_clusters/python_modules.html|IPSL Mesocenter]], ...   * Read the servers/clusters Python-related documentation: [[https://wiki.lsce.ipsl.fr/pmip3/doku.php/other:python:starting|Python at LSCE by JYP]], [[https://intranet.lsce.ipsl.fr/informatique/index.php|LSCE]], [[https://documentations.ipsl.fr/spirit/spirit_clusters/python_modules.html|IPSL Mesocenter]], ...
Line 52: Line 54:
   * there is a //jupyter notebook server// connected to your Linux cluster (e.g. https://jupyter.lsce.ipsl.fr/)   * there is a //jupyter notebook server// connected to your Linux cluster (e.g. https://jupyter.lsce.ipsl.fr/)
   * 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 (in the listed //kernels//), 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 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**+
  
  
Line 102: Line 104:
     * ''https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Windows-x86_64.exe''     * ''https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Windows-x86_64.exe''
       * Visit the [[https://github.com/conda-forge/miniforge/releases/latest|latest release page]] if you want to know the actual version number       * Visit the [[https://github.com/conda-forge/miniforge/releases/latest|latest release page]] if you want to know the actual version number
-      * September 2025: The ''Miniforge3 25.3.1-0'' installer is based on ''Python 3.12.11'' and ''Conda 25.3.1''+      * October 2025: The ''Miniforge3 25.3.1-0'' installer is based on ''Python 3.12.11'' and ''Conda 25.3.1''
  
-  * Find some temporary disk space on Windows+  * Find some temporary disk space on Windows to download the installer (71 Mb as of October 2025)
     * e.g. ''C:\Scratch\your_login'' or whatever you use as a [[other:win10config#local_scratch_folder|local Scratch folder]]     * e.g. ''C:\Scratch\your_login'' or whatever you use as a [[other:win10config#local_scratch_folder|local Scratch folder]]
  
Line 111: Line 113:
       * We recommend installing [[other:win10apps#windows_terminal|Windows Terminal]] and making it the default terminal for using Powershell       * We recommend installing [[other:win10apps#windows_terminal|Windows Terminal]] and making it the default terminal for using Powershell
  
-  * Use ''curl'' to download the latest installer (71 Mb as of September 2025): <code>PS C:\> cd C:\Scratch\your_login+  * Use ''curl'' to download the latest installer (71 Mb as of October 2025): <code>PS C:\> cd C:\Scratch\your_login
  
 PS C:\Scratch\your_login> curl https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Windows-x86_64.exe -o miniforge3.exe PS C:\Scratch\your_login> curl https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Windows-x86_64.exe -o miniforge3.exe
Line 125: Line 127:
     * You should **avoid installing Miniforge3 in your Windows //home// folder** (''C:\Users\your_login'' or [[other:win10config#local_home_folder|<some_disk_different_from_c>:\Users\<your_login>]]), if you want to be able to easily create backups or your //home// folder, without backing up thousands of files related to your Python environments...     * You should **avoid installing Miniforge3 in your Windows //home// folder** (''C:\Users\your_login'' or [[other:win10config#local_home_folder|<some_disk_different_from_c>:\Users\<your_login>]]), if you want to be able to easily create backups or your //home// folder, without backing up thousands of files related to your Python environments...
     * We add some date or version information at the end of the folder name, in order to differentiate it from other (older of future) installations     * We add some date or version information at the end of the folder name, in order to differentiate it from other (older of future) installations
-    * Example installation folder: ''C:\Utils\miniforge3_2025-09'' (if we start installing in September 2025)+    * Example installation folder: ''C:\Utils\miniforge3_2025-10'' (if we start installing in October 2025)
  
   * Launch the Miniforge3 installer with<code>PS C:\Scratch\your_login> .\miniforge3.exe</code>   * Launch the Miniforge3 installer with<code>PS C:\Scratch\your_login> .\miniforge3.exe</code>
Line 132: Line 134:
     * (Review and) accept the //License Agreement//     * (Review and) accept the //License Agreement//
     * Choose to install for //Just Me// (the recommended default choice)     * Choose to install for //Just Me// (the recommended default choice)
-    * Specify the //Destination Folder// selected above,\\ e.g. ''C:\Utils\miniforge3_2025-09''+    * Specify the //Destination Folder// selected above,\\ e.g. ''C:\Utils\miniforge3_2025-10''
     * Use (only) the following //Advanced Installation Options// (probably pre-selected).\\ These options should have no side-effects on your system, or other existing Python installations on your system     * Use (only) the following //Advanced Installation Options// (probably pre-selected).\\ These options should have no side-effects on your system, or other existing Python installations on your system
-      * //Create start menu shortcuts//+      * //Create shortcuts// 
 +        * This will add shortcuts to the Windows ''Start'' menu
       * //Clear the package cache upon completion//       * //Clear the package cache upon completion//
  
   * When the installer has finished running, you should have:   * When the installer has finished running, you should have:
-    * A new ''C:\Utils\miniforge3_2025-09'' folder +    * A new ''C:\Utils\miniforge3_2025-10'' folder 
-      * This folder size will be ~300 Mb (as of September 2025) and will keep on growing (up to several Gb) as you add more Python environments and packages+      * This folder size will be ~300 Mb (as of October 2025) and will keep on growing (up to several Gb) as you add more Python environments and packages
         * => **Be sure to always have enough space on the installation disk!**         * => **Be sure to always have enough space on the installation disk!**
     * A new shortcut in the Windows ''Start'' menu:     * A new shortcut in the Windows ''Start'' menu:
       * ''Start''=>''M''=>''Miniforge3'' menu:       * ''Start''=>''M''=>''Miniforge3'' menu:
-      * ''Miniforge Prompt'' +      * ''Miniforge Prompt'' shortcut 
-        * We will now use this ''Miniforge Prompt'' shortcut each time we need to use a ''conda'' or ''python'' related to this installation of miniforge3 +        * We will now use this ''Miniforge Prompt'' shortcut each time we need to use a ''conda'' or ''python'' executable related to this installation of miniforge3 
-      * We recommended to [[other:win10apps#windows_terminal|installing Windows Terminal and making it the default terminal application]], so that the ''conda'' prompts will open in a modern (and highly configurable) terminal+      * We recommend to [[other:win10apps#windows_terminal|install Windows Terminal and make it the default terminal application]], so that the ''Miniforge'' prompts will open in a modern (and highly configurable) Windows terminal
  
   * Remove the installer<code>PS C:\Scratch\your_login> del miniforge3.exe</code>   * Remove the installer<code>PS C:\Scratch\your_login> del miniforge3.exe</code>
  
-  * Open a //Miniforge Prompt//, and type a few commands to make sure that the newly installed ''conda'' and python are working\\ Opening a Miniforge prompt will automatically initialize the Python ''(base)'' environment installed with the Miniforge3 installer.+  * Open a //Miniforge Prompt//, and type a few commands to make sure that the newly installed ''conda'' and ''python'' run correctly\\ Opening a ''Miniforge prompt'' will automatically initialize the Python ''(base)'' environment installed with the Miniforge3 installer.
     * ''Start''=>''M''=>''Miniforge3'' => ''Miniforge Prompt''     * ''Start''=>''M''=>''Miniforge3'' => ''Miniforge Prompt''
     * <code>(base) C:\Users\your_login>where.exe conda     * <code>(base) C:\Users\your_login>where.exe conda
-C:\Utils\miniforge3_2025-09\Library\bin\conda.bat +C:\Utils\miniforge3_2025-10\Library\bin\conda.bat 
-C:\Utils\miniforge3_2025-09\Scripts\conda.exe +C:\Utils\miniforge3_2025-10\Scripts\conda.exe 
-C:\Utils\miniforge3_2025-09\condabin\conda.bat+C:\Utils\miniforge3_2025-10\condabin\conda.bat
  
 (base) C:\Users\your_login>conda --version (base) C:\Users\your_login>conda --version
Line 162: Line 165:
 # conda environments: # conda environments:
 # #
-base                 * C:\Utils\miniforge3_2025-09+base                 * C:\Utils\miniforge3_2025-10
  
 (base) C:\Users\your_login>conda list (base) C:\Users\your_login>conda list
-# packages in environment at C:\Utils\miniforge3_2025-09:+# packages in environment at C:\Utils\miniforge3_2025-10:
 # #
 # Name                    Version                   Build  Channel # Name                    Version                   Build  Channel
Line 186: Line 189:
 >>> pprint.pprint(sys.path) >>> pprint.pprint(sys.path)
 ['', ['',
- 'C:\\Utils\\miniforge3_2025-09\\python312.zip', + 'C:\\Utils\\miniforge3_2025-10\\python312.zip', 
- 'C:\\Utils\\miniforge3_2025-09\\DLLs', + 'C:\\Utils\\miniforge3_2025-10\\DLLs', 
- 'C:\\Utils\\miniforge3_2025-09\\Lib', + 'C:\\Utils\\miniforge3_2025-10\\Lib', 
- 'C:\\Utils\\miniforge3_2025-09', + 'C:\\Utils\\miniforge3_2025-10', 
- 'C:\\Utils\\miniforge3_2025-09\\Lib\\site-packages']+ 'C:\\Utils\\miniforge3_2025-10\\Lib\\site-packages']
 >>> ^Z</code> >>> ^Z</code>
  
-  * Check if ''conda-forge'' is the default and only channel that conda will use to update the newly installed ''base'' environment, and future environments+  * Check if ''conda-forge'' is the default and only channel that ''conda'' will use to update the newly installed ''base'' environment, and future environments
     * The ''%%--%%get channels'' command should only mention ''%%'%%conda-forge%%'%%''<code>(base) C:\Users\jypeter>conda config --get channels     * The ''%%--%%get channels'' command should only mention ''%%'%%conda-forge%%'%%''<code>(base) C:\Users\jypeter>conda config --get channels
 --add channels 'conda-forge'   # lowest priority</code> --add channels 'conda-forge'   # lowest priority</code>
-    * If you get something else, you may have a ''.condarc'' configuration file left over from a previous ''conda'' installation. Depending on its content, you may have to remove or edit the ''.condarc'' file, or it may be OK to leave it unchanged+    * **If you get something else**, you may have a ''.condarc'' configuration file left over from a previous ''conda'' installation. Depending on its content, you may have to remove or edit the ''.condarc'' file, or it may be OK to leave it unchanged
       * Example: you use a ''cmd'' terminal, and there is NO existing ''.condarc'' file<code>(base) C:\Users\your_login>more %HOMEPATH%\.condarc       * Example: you use a ''cmd'' terminal, and there is NO existing ''.condarc'' file<code>(base) C:\Users\your_login>more %HOMEPATH%\.condarc
 Impossible d’accéder au fichier C:\Users\your_login\.condarc</code> Impossible d’accéder au fichier C:\Users\your_login\.condarc</code>
Line 206: Line 209:
   * **Next**: follow **all** the other Miniforge3 related instructions for the other Operating Systems   * **Next**: follow **all** the other Miniforge3 related instructions for the other Operating Systems
     * ''conda'' **commands will work the same way on all Operating Systems** (Windows and Linux-like)     * ''conda'' **commands will work the same way on all Operating Systems** (Windows and Linux-like)
-    * The ''.condarc'' is located in your Windows //home// folder\\ => ''C:\Users\your_login\.condarc''+    * If instructions mention the ''.condarc'' configuration file, it is located in your Windows //home// folder\\ => ''C:\Users\your_login\.condarc''
       * Easily displaying the configuration file       * Easily displaying the configuration file
         * ''cmd'': ''more %HOMEPATH%\.condarc''         * ''cmd'': ''more %HOMEPATH%\.condarc''
other/uvcdat/cdat_conda/miniforge_install.1759328343.txt.gz · Last modified: by jypeter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki