User Tools

Site Tools


other:uvcdat:cdat_conda:cdat_8_0_py2

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:cdat_8_0_py2 [2019/02/27 14:27]
jypeter
other:uvcdat:cdat_conda:cdat_8_0_py2 [2019/03/04 10:47]
jypeter [Getting ready for a moving default CDAT] Added warning
Line 29: Line 29:
       * Accept the license       * Accept the license
       * Specify an explicit installation path **outside of the home directory**,​ with enough disk space (more than 3G if you are going to install UV-CDAT and some extra packages), preferably on a disk that is not backed up:       * Specify an explicit installation path **outside of the home directory**,​ with enough disk space (more than 3G if you are going to install UV-CDAT and some extra packages), preferably on a disk that is not backed up:
-        * Linux: ''/​home/​share/​unix_files/​cdat/​miniconda3''​+        * Linux LSCE: ''/​home/​share/​unix_files/​cdat/​miniconda3''​ 
 +        * Linux ciclad: ''/​data/​jypmce/​cdat/​miniconda3''​
         * WSL: installing to a directory that is not in ''/​home/''​ <wrap hi>does not work</​wrap>​ (e.g. ''/​mnt/​h/​CDAT/​miniconda3'',​assuming there is a ''​H:​\CDAT\''​ directory, does not work)\\ Need to accept the installation in the default location: ''/​home/​jypeter/​miniconda3''​         * WSL: installing to a directory that is not in ''/​home/''​ <wrap hi>does not work</​wrap>​ (e.g. ''/​mnt/​h/​CDAT/​miniconda3'',​assuming there is a ''​H:​\CDAT\''​ directory, does not work)\\ Need to accept the installation in the default location: ''/​home/​jypeter/​miniconda3''​
- 
         * Resulting ''​miniconda3''​ directory size is 302M\\ <​code>​ >du -sh miniconda3         * Resulting ''​miniconda3''​ directory size is 302M\\ <​code>​ >du -sh miniconda3
 302M    miniconda3 302M    miniconda3
Line 49: Line 49:
 92K     ssl 92K     ssl
 12K     ​x86_64-conda_cos6-linux-gnu</​code>​ 12K     ​x86_64-conda_cos6-linux-gnu</​code>​
-      * Accept the automatic update of the //PATH// variable in ''​.bashrc''​ (note: the installer automatically creates a backup of ''​.bashrc''​)+      * Accept the automatic update of the //PATH// variable in ''​.bashrc''​ (note: the installer automatically creates a backup of ''​.bashrc''​). This will some extra lines at the end of ''​.bashrc''​ used by the //old-style conda initialization//​ (we will later switch to the //​new-style//​). The added lines should look like:
         * ''#​ added by Miniconda3 installer''​\\ ''​export PATH="/​home/​share/​unix_files/​cdat/​miniconda3/​bin:​$PATH"''​         * ''#​ added by Miniconda3 installer''​\\ ''​export PATH="/​home/​share/​unix_files/​cdat/​miniconda3/​bin:​$PATH"''​
 +        * ''#​ added by Miniconda4.xxx installer''​\\ ''​[some really fancy bash shell commands]''​
 +  * Remove the installer: ''​rm Miniconda3-latest-Linux-x86_64.sh''​
   * Open a new terminal (if you use bash) or open a new terminal and type ''​bash''​   * Open a new terminal (if you use bash) or open a new terminal and type ''​bash''​
     * check if the python from the conda distribution has been correctly installed\\ <​code>​ > bash     * check if the python from the conda distribution has been correctly installed\\ <​code>​ > bash
Line 75: Line 77:
 ==== Post-Miniconda3 installation ==== ==== Post-Miniconda3 installation ====
  
-The idea is to remove the miniconda3 initialization lines that were automatically added at the end of ''​.bashrc''​ and put them (and other useful commands) in a special initialization file, that can be sourced only when we actually want to use conda and CDAT+The idea is to remove the miniconda3 initialization lines that were automatically added at the end of ''​.bashrc''​ and put them (and other useful commands) in a special initialization file, that can be sourced only when we actually want to use conda and CDAT (in order to avoid potentiel side effects)
  
 === New style initialization === === New style initialization ===
Line 81: Line 83:
 Note: this is the **new** ''​conda activate some_version''​ style Note: this is the **new** ''​conda activate some_version''​ style
  
-See the ''​~jypeter/​.conda3_jyp.sh''​ file below, and how to use it, **in a bash shell**. In a **tcsh shell**, see the ''​~jypeter/​.conda3_jyp.csh''​ further down+See the ''​~jypeter/​.conda3_jyp.sh''​ file below, and how to use it, **in a bash shell**. In a **tcsh shell**, see the ''​~jypeter/​.conda3_jyp.csh''​ further down. In both shell cases, if you are installing your own version of python, you need to use your own location of the initialization files in the ''​source''​ lines, and you can use another file name than ''​conda3_jyp''​
  
 <​code>​$ which python <​code>​$ which python
Line 104: Line 106:
 # Jean-Yves Peterschmitt - LSCE - 11/2018 # Jean-Yves Peterschmitt - LSCE - 11/2018
  
-/​home/​share/​unix_files/​cdat/​miniconda3/​etc/​profile.d/​conda.sh+source ​/​home/​share/​unix_files/​cdat/​miniconda3/​etc/​profile.d/​conda.sh
  
 # Use the alias below to easily determine where your python # Use the alias below to easily determine where your python
Line 117: Line 119:
 $ source ~jypeter/​.conda3_jyp.sh $ source ~jypeter/​.conda3_jyp.sh
  
-$ conda activate ​cdatm +$ conda activate 
-(cdatm) $ which python +(base) $ which python 
-/​home/​share/​unix_files/​cdat/​miniconda3/envs/cdatm/bin/python+/​home/​share/​unix_files/​cdat/​miniconda3/​bin/​python
  
 </​code>​ </​code>​
Line 151: Line 153:
 # interpreter is located # interpreter is located
 alias wp "which python"​ alias wp "which python"​
- 
-# Where are ALL the python interpreters in the search path 
-alias wpa "​\which -a python"​ 
  
 # The end # The end
Line 159: Line 158:
  >​source ​ ~jypeter/​.conda3_jyp.csh  >​source ​ ~jypeter/​.conda3_jyp.csh
  
- >​conda activate ​cdatm+ >​conda activate
  
-(cdatm) >which python +(base) >which python 
-/​home/​share/​unix_files/​cdat/​miniconda3/envs/cdatm/​bin/​python</​code>​+/​home/​share/​unix_files/​cdat/​miniconda3/​bin/​python</​code>​ 
 + 
 +You probably don't want to type the //source// line each time you need to use your conda based python, so you can add a ''​source ​ ~jypeter/​.conda3_jyp.sh''​ line in your ''​~/​.bashrc''​ file, and ''​source ​ ~jypeter/​.conda3_jyp.csh''​ line in your ''​~/​.cshrc''​ file. Then, when you need a specific python environment,​ just type ''​conda activate name_of_the_specific_environment''​
  
 === Old style initialization === === Old style initialization ===
 +
 +<WRAP center round tip 60%>
 +The //old style// notes below are just for reference sake and you can skip them
 +</​WRAP>​
 +
  
 Note: this is the **old** ''​source activate some_version''​ style Note: this is the **old** ''​source activate some_version''​ style
Line 209: Line 215:
  
 ==== Installing CDAT 8.0 ==== ==== Installing CDAT 8.0 ====
 +
 +=== Python 2.7 version ===
  
 <​code>​$ conda create -n cdat-8.0_py2 -c cdat/​label/​v80 -c conda-forge -c cdat python=2.7 cdat <​code>​$ conda create -n cdat-8.0_py2 -c cdat/​label/​v80 -c conda-forge -c cdat python=2.7 cdat
Line 237: Line 245:
 2.8G    /​home/​share/​unix_files/​cdat/​miniconda3/​envs/​cdat-8.0_py2</​code>​ 2.8G    /​home/​share/​unix_files/​cdat/​miniconda3/​envs/​cdat-8.0_py2</​code>​
  
 +=== Python 3.6 version ===
 +
 +<​code>​$ conda create -n cdat-8.0_py3 -c cdat/​label/​v80 -c conda-forge -c cdat python=3.6 cdat</​code>​
 +
 +==== Installing CDAT nightly ====
 +
 +Notes:
 +
 +  * This page is about CDAT 8.0, but we have added a short nightly section here as a convenient shortcut. This should probably be moved to a stand-alone nightly page later
 +  * [[https://​github.com/​CDAT/​cdat/​wiki/​Obtain-CDAT-nightly-packages|Official nightly page]]
 +
 +=== Python 2.7 version ===
 +
 +<​code>​$ conda create -n cdat-nightly_py2 -c cdat/​label/​nightly -c conda-forge -c cdat python=2.7 cdat</​code>​
 +
 +<wrap hi>Not tested!</​wrap>​ Can this be updated with ''​conda update -n cdat-nightly_py2 -c cdat/​label/​nightly -c conda-forge -c cdat --all''​ ???
 +
 +=== Python 3.6 version ===
 +
 +<​code>​$ conda create -n cdat-nightly_py3 -c cdat/​label/​nightly -c conda-forge -c cdat python=3.6 cdat</​code>​
  
 ===== Cloning cdat to add specific packages for LSCE ===== ===== Cloning cdat to add specific packages for LSCE =====
Line 264: Line 292:
  
 </​code>​ </​code>​
 +
 +==== cdat nightly case ====
 +
 +''​conda create -n cdatm-nightly_py2 %%--%%clone cdat-nightly_py2''​
  
 ===== Getting ready for a moving default CDAT ===== ===== Getting ready for a moving default CDAT =====
 +
 +<note warning>​This step should probably be listed at the **end**, especially in a multi-user environment! If there is already a ''​cdatm''​ link, make sure that the new version is stable and working correctly before updating the ''​cdatm''​ link</​note>​
  
 We create a **//cdatm// symbolic link** in the ''​envs''​ directory, that has a //stable name// but can be moved to point to the latest default CDAT. In that case, most users can just activate this //cdatm// version and always get the latest stable version We create a **//cdatm// symbolic link** in the ''​envs''​ directory, that has a //stable name// but can be moved to point to the latest default CDAT. In that case, most users can just activate this //cdatm// version and always get the latest stable version
other/uvcdat/cdat_conda/cdat_8_0_py2.txt · Last modified: 2021/02/27 13:55 by jypeter