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
other:uvcdat:cdat_conda:miniconda3_install [2024/07/05 14:11]
jypeter [Cleaning up Miniconda3...] Rewrote the section
other:uvcdat:cdat_conda:miniconda3_install [2024/08/09 15:42] (current)
jypeter Added a new "Creating Windows menu shortcuts to start environments" section
Line 124: Line 124:
       * ''​Anaconda Prompt''​       * ''​Anaconda Prompt''​
       * ''​Anaconda Powershell Prompt''​       * ''​Anaconda Powershell Prompt''​
-        * **We will now use this //​Anaconda ​PowerShell// shortcut each time we need to use Miniconda3 or Python**+        * **We will now use this //​Anaconda ​Powershell// shortcut each time we need to use Miniconda3 or Python** 
 +      * It is **highly recommended to [[other:​win10apps#​windows_terminal|install Windows Terminal and make it the default terminal application]]**,​ so that the ''​conda''​ prompts will open in a modern (and highly configurable) terminal
  
   * Remove the installer<​code>​PS C:​\Scratch\your_login>​ del .\miniconda.exe</​code>​   * Remove the installer<​code>​PS C:​\Scratch\your_login>​ del .\miniconda.exe</​code>​
Line 559: Line 560:
     * FIXME: update/​rewrite the [[other:​uvcdat:​cdat_conda:​cdat_2024_03]] page     * FIXME: update/​rewrite the [[other:​uvcdat:​cdat_conda:​cdat_2024_03]] page
  
 +
 +===== Creating Windows menu shortcuts to start environments =====
 +
 +FIXME => Move this section somewhere else?
 +
 +  * Use ''​conda install''​ and what is described in [[https://​github.com/​conda/​menuinst/​issues/​246|Easily creating shortcuts with the powershell_shortcut_miniconda and console_shortcut_miniconda packages, and can this be replicated with menuinst ?]]
 +
 +  * Can theoretically be done with [[https://​conda.github.io/​menuinst/​|menuinst]]
 +    * [[https://​github.com/​conda/​menuinst|menuinst @ GH]]
 +
 +  * FIXME Find a way to add Windows Terminal profiles
 +    * See ''​menuinst''​+[[https://​github.com/​conda/​menuinst/​issues/​196|Add Windows Terminal profile option]]
 ===== conda resources ===== ===== conda resources =====
  
Line 564: Line 577:
 ==== Web sites ==== ==== Web sites ====
  
-  * [[https://​docs.conda.io/​projects/​conda/​en/​stable/​|Official ​conda website]]+  * [[https://​docs.conda.io/​projects/​conda/​en/​stable/​|Official ​Documentation site]]
     * [[https://​docs.conda.io/​projects/​conda/​en/​stable/​user-guide/​cheatsheet.html|Cheat sheet]] (2 pages, for people in a hurry)     * [[https://​docs.conda.io/​projects/​conda/​en/​stable/​user-guide/​cheatsheet.html|Cheat sheet]] (2 pages, for people in a hurry)
     * [[https://​docs.conda.io/​projects/​conda/​en/​stable/​commands/​|Commands'​ reference]]     * [[https://​docs.conda.io/​projects/​conda/​en/​stable/​commands/​|Commands'​ reference]]
 +    * [[https://​docs.conda.io/​projects/​conda-build/​en/​stable/​resources/​package-spec.html#​conda-package-specification|Conda package specification]]
 +      * This helps understand (and [[https://​github.com/​conda/​conda/​issues/​14026|use]]) the content of the ''/​path_to_miniconda/​pkgs''​ directory
 +
 +  * [[https://​conda.org/​blog/​|conda community site]]:
 +    * [[https://​conda.org/​blog/​|conda Blog]]: ''​conda''​ new features, etc...
 +
 +  * [[https://​github.com/​conda/​conda|conda @ GitHub]]
 +
   * Package repositories   * Package repositories
     * [[https://​conda-forge.org/​packages/​|conda-forge]] <= recommended source of packages     * [[https://​conda-forge.org/​packages/​|conda-forge]] <= recommended source of packages
Line 661: Line 682:
     * **Specific versions can be specified** by using the [[#​the_conda_matchspec_format|conda MatchSpec format]]     * **Specific versions can be specified** by using the [[#​the_conda_matchspec_format|conda MatchSpec format]]
     * ''​conda remove package1 package2 packageN''​     * ''​conda remove package1 package2 packageN''​
- +    ​Matching ''​pip''​ commands (**only** if the package is not available in conda!) 
-  ​Display the **dependencies of a package**, and the **packages that need a specific packages** +      * ''​pip install package''​ 
-    e.g. the ''​requests''​ package+      * ''​pip uninstall ​package''​
  
   * **Update a package** in the current, or a specific environment   * **Update a package** in the current, or a specific environment
     * ''​conda update -n existing_environment installed_package''​     * ''​conda update -n existing_environment installed_package''​
-    * Update only the ''​conda''​ package (not the full Miniconda3 //base// environment) in the ''​base''​ environment\\ ''​conda update -n base conda''​+    * Update only the ''​conda''​ package (not the full Miniconda3 //base// environment) in the ''​base''​ environment 
 +      * ''​conda update -n base conda''​ 
 +      * Changes and new ''​conda''​ features are detailed in the [[https://​conda.org/​blog/​|conda Blog]] 
 +    * Matching ''​pip''​ command (**only** if the package is not available in conda!) 
 +      * ''​pip install %%--%%upgrade package''​
  
   * **Completely update an environment** (i.e. update **all** the packages)   * **Completely update an environment** (i.e. update **all** the packages)
Line 677: Line 702:
       * Note: ''​mamba repoquery''​ currently [[https://​github.com/​mamba-org/​mamba/​issues/​3334|only works in the currently active environment]]       * Note: ''​mamba repoquery''​ currently [[https://​github.com/​mamba-org/​mamba/​issues/​3334|only works in the currently active environment]]
     * It can be useful to determine:     * It can be useful to determine:
-      * the packages that are required in order to use a given package => ''​depends''​ +      * the packages that are required in order to use a given package => ''​mamba repoquery **depends** package''​ 
-      * the packages that need a given package => ''​whoneeds''​+        * Without ''​mamba repoquery depends'',​ you would have to follow the steps in [[https://​docs.conda.io/​projects/​conda/​en/​stable/​user-guide/​tasks/​manage-pkgs.html#​listing-package-dependencies|Listing package dependencies]] :-( 
 +      * the packages that need a given package => ''​mamba repoquery **whoneeds** package''​
     * Example: the ''​[[https://​github.com/​tqdm/​tqdm|tqdm]]''​ package     * Example: the ''​[[https://​github.com/​tqdm/​tqdm|tqdm]]''​ package
       * ''​conda''​ needs ''​tqdm''​ to display package download and installation progress, and the base dependencies of ''​tqdm''​ are ''​[[https://​github.com/​tartley/​colorama|colorama]]'',​ and of course ''​python''​       * ''​conda''​ needs ''​tqdm''​ to display package download and installation progress, and the base dependencies of ''​tqdm''​ are ''​[[https://​github.com/​tartley/​colorama|colorama]]'',​ and of course ''​python''​
Line 708: Line 734:
 </​code>​ </​code>​
  
-  * Checking the health of an environment+  ​* **Checking the //health// of an environment** with ''​[[https://​docs.conda.io/​projects/​conda/​en/​stable/​commands/​doctor.html|conda doctor]]''​
     * Some details in [[https://​conda.org/​blog/​2023-06-01-conda-doctor/​|Detecting conda environment inconsistencies easily]]     * Some details in [[https://​conda.org/​blog/​2023-06-01-conda-doctor/​|Detecting conda environment inconsistencies easily]]
 +      * ''​conda doctor''​ does not do much yet, and not necessarily in a useful way, but this will hopefully improve over time!
 +        * [[https://​github.com/​conda/​conda/​issues/​14017|'​conda doctor'​ output should be improved]]
 +        * [[https://​github.com/​conda/​conda/​issues/​13574#​issuecomment-2214291304|What exactly are altered files?]]
     * ''​conda doctor -n base''​     * ''​conda doctor -n base''​
     * Example:<​code>​ >conda doctor -n base     * Example:<​code>​ >conda doctor -n base
Line 725: Line 754:
 </​code>​ </​code>​
  
-  * **Cleaning... ​<wrap em>​Dangerous</​wrap>​**! +  * **Cleaning...** 
-    * ''​conda''​ does not automatically clean the content of the ''​pkgs''​ directory +    * ''​conda''​ does not automatically clean the content of the ''​/​path_to_miniconda/​pkgs''​ directory ​and the size of ''​/​path_to_miniconda/​'' ​will keep on growingas you add new environments, ​or update existing ones 
-    * If you have several environments, ​''​conda clean'' ​may remove packages that are not needed in an environmentbut are still used in other environments, ​and **you may end up with a broken installation...** +    * All the details ​are in the [[#​cleaning_up_miniconda3|Cleaning up Miniconda3...]] ​section
-    * More details in [[#​cleaning_up_miniconda3|Cleaning up Miniconda3...]]+
  
  
Line 735: Line 763:
   * Read the [[https://​docs.conda.io/​projects/​conda/​en/​stable/​commands/#​conda-vs-pip-vs-virtualenv-commands|Conda vs. pip vs. virtualenv commands]] section   * Read the [[https://​docs.conda.io/​projects/​conda/​en/​stable/​commands/#​conda-vs-pip-vs-virtualenv-commands|Conda vs. pip vs. virtualenv commands]] section
  
-  * Read the [[https://​docs.conda.io/​projects/​conda/​en/​stable/​user-guide/​tasks/​manage-environments.html#​using-pip-in-an-environment|Using pip in an environment]]+  * Read the [[https://​docs.conda.io/​projects/​conda/​en/​stable/​user-guide/​tasks/​manage-environments.html#​using-pip-in-an-environment|Using pip in a conda environment]] 
 +    * //Issues may arise when using pip and conda together//​...
 ==== Installation history ==== ==== Installation history ====
  
Line 809: Line 838:
 FIXME FIXME
  
 +
 +===== Improving conda and related tools =====
 +
 +There is always room for improvement,​ and this is is some kind of //TODO// section
 +
 +==== conda and mamba ideas ====
 +
 +  * [[https://​github.com/​conda/​conda/​issues/​14026|Add a conda command to find the package owning a file]]
 +    * The link also shows how to do it with standard Linux tools (find, grep), based on the [[https://​docs.conda.io/​projects/​conda-build/​en/​stable/​resources/​package-spec.html#​conda-package-specification|Conda package specification]] page
 +    * [[https://​github.com/​kelvinou01/​conda-which|conda-which]] seems to work (see [[https://​github.com/​conda/​conda/​issues/​14026#​issuecomment-2268821608|test / example]]) !
  
 /* standard page footer */ /* standard page footer */
other/uvcdat/cdat_conda/miniconda3_install.1720188716.txt.gz · Last modified: 2024/07/05 14:11 by jypeter