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 [2018/11/08 17:01]
jypeter
other:uvcdat:cdat_conda:cdat_8_0_py2 [2019/02/27 10:54]
jypeter
Line 18: Line 18:
 ==== Installing Miniconda3 ====  ==== Installing Miniconda3 ==== 
  
-We have installed a new version of Miniconda3, by following ​the existing ​[[other:​uvcdat:​conda_notes#​installing_miniconda|installing miniconda]] instructions+We have installed a new version of Miniconda3 ​(steps below adapated from the [[other:​uvcdat:​conda_notes#​installing_miniconda|installing miniconda]] instructions)
  
-  * Follow the [[https://​conda.io/​docs/​install/​quick.html|Quick install]] steps to install Miniconda + 
-    * Get the [[https://​repo.continuum.io/​miniconda/​Miniconda3-latest-Linux-x86_64.sh|Python 3.7 Linux 64-bit (bash installer)]] (unless there is a [[https://​conda.io/​miniconda.html|more recent version?​]]) +  * Get the [[https://​repo.continuum.io/​miniconda/​Miniconda3-latest-Linux-x86_64.sh|Python 3.7 Linux 64-bit (bash installer)]] (unless there is a [[https://​conda.io/​miniconda.html|more recent version?​]]) 
-      * ''​cd /​home/​scratch01/​jypeter''​ (some temporary storage space for the installer) +    * ''​cd /​home/​scratch01/​jypeter''​ (some temporary storage space for the installer) 
-      * ''​wget https://​repo.continuum.io/​miniconda/​Miniconda3-latest-Linux-x86_64.sh''​ (60 Mo, 11 Nov 2018+    * ''​wget https://​repo.continuum.io/​miniconda/​Miniconda3-latest-Linux-x86_64.sh''​ (67 Mo, 15 Feb 2019
-    * Execute the installer +  * Execute the installer 
-      * ''​bash Miniconda3-latest-Linux-x86_64.sh''​ +    * ''​bash Miniconda3-latest-Linux-x86_64.sh''​ 
-        * 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: ''/​home/​share/​unix_files/​cdat/​miniconda3''​ +      * 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: ''/​home/​share/​unix_files/​cdat/​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
  >​cd miniconda3  >​cd miniconda3
Line 45: Line 45:
 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''​) 
-          * ''#​ 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"''​ 
-    * 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
 $ which python $ which python
 /​home/​share/​unix_files/​cdat/​miniconda3/​bin/​python /​home/​share/​unix_files/​cdat/​miniconda3/​bin/​python
 $ which conda $ which conda
 /​home/​share/​unix_files/​cdat/​miniconda3/​bin/​conda</​code>​ /​home/​share/​unix_files/​cdat/​miniconda3/​bin/​conda</​code>​
-      ​* Update and clean the new installation\\ <​code>​$ conda update --all+    ​* Update and clean the new installation\\ <​code>​$ conda update --all
 $ du -sh /​home/​share/​unix_files/​cdat/​miniconda3 $ du -sh /​home/​share/​unix_files/​cdat/​miniconda3
 515M    /​home/​share/​unix_files/​cdat/​miniconda3 515M    /​home/​share/​unix_files/​cdat/​miniconda3
Line 68: Line 68:
 requests ​                 2.20.0 ​                  ​py37_0 requests ​                 2.20.0 ​                  ​py37_0
 [...]</​code>​ [...]</​code>​
-  * 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 (see ''​~jypeter/​.conda3_jyp.sh''​ below), that can be sourced only when we actually want to use conda and CDAT\\ <​code>​bash-4.2$ which python+ 
 +==== 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 
 + 
 +=== New style initialization === 
 + 
 +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 
 + 
 +<​code>​$ which python
 /​usr/​bin/​python /​usr/​bin/​python
 +
 $ cat ~jypeter/​.conda3_jyp.sh $ cat ~jypeter/​.conda3_jyp.sh
-# Conda initialization by JYP+# Conda initialization by JYP, NEW style
 # #
 # Use this for working with conda and CDAT centrally managed by JYP # Use this for working with conda and CDAT centrally managed by JYP
 +#
 +# Execute this file in a BASH shell with
 +#     ​source path/​this_file
 +# Then get the list of available python distributions with
 +#     conda env list
 +# Then activate a specific distribution with
 +#     conda activate version_name
 # #
 # More details in: # More details in:
-#   ​https://​wiki.lsce.ipsl.fr/​pmip3/​doku.php/​other:​python:​starting#​conda-based_v ​                                   ersions_of_uv-cdat+#   ​https://​wiki.lsce.ipsl.fr/​pmip3/​doku.php/​other:​python:​starting#​conda-based_versions_of_uv-cdat
 #   ​https://​wiki.lsce.ipsl.fr/​pmip3/​doku.php/​other:​uvcdat:​conda_notes #   ​https://​wiki.lsce.ipsl.fr/​pmip3/​doku.php/​other:​uvcdat:​conda_notes
 # #
 # Jean-Yves Peterschmitt - LSCE - 11/2018 # Jean-Yves Peterschmitt - LSCE - 11/2018
  
-export PATH="/​home/​share/​unix_files/​cdat/​miniconda3/​bin:​$PATH"​+/​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 91: Line 110:
  
 # The end # The end
 +
 $ source ~jypeter/​.conda3_jyp.sh $ source ~jypeter/​.conda3_jyp.sh
 +
 +$ conda activate cdatm
 +(cdatm) $ which python
 +/​home/​share/​unix_files/​cdat/​miniconda3/​envs/​cdatm/​bin/​python
 +
 +</​code>​
 +
 +**tcsh shell** usage example
 +
 +<​code>​ >which python
 +/​usr/​bin/​python
 +
 + >​cat ~jypeter/​.conda3_jyp.csh
 +# Conda initialization by JYP, NEW style
 +#
 +# Use this for working with conda and CDAT centrally managed by JYP
 +#
 +# Execute this file in a TCSH shell with
 +#     ​source path/​this_file
 +# Then get the list of available python distributions with
 +#     conda env list
 +# Then activate a specific distribution with
 +#     conda activate version_name
 +#
 +# More details in:
 +#   ​https://​wiki.lsce.ipsl.fr/​pmip3/​doku.php/​other:​python:​starting#​conda-based_versions_of_uv-cdat
 +#   ​https://​wiki.lsce.ipsl.fr/​pmip3/​doku.php/​other:​uvcdat:​conda_notes
 +#
 +# Jean-Yves Peterschmitt - LSCE - 11/2018
 +
 +source /​home/​share/​unix_files/​cdat/​miniconda3/​etc/​profile.d/​conda.csh
 +
 +# Use the alias below to easily determine where your python
 +# interpreter is located
 +alias wp "which python"​
 +
 +# Where are ALL the python interpreters in the search path
 +alias wpa "​\which -a python"​
 +
 +# The end
 +
 + >​source ​ ~jypeter/​.conda3_jyp.csh
 +
 + >​conda activate cdatm
 +
 +(cdatm) >which python
 +/​home/​share/​unix_files/​cdat/​miniconda3/​envs/​cdatm/​bin/​python</​code>​
 +
 +=== Old style initialization ===
 +
 +Note: this is the **old** ''​source activate some_version''​ style
 +
 +See the ''​~jypeter/​.conda3old_jyp.sh''​ file below, and how to use it, **in a bash shell**
 +
 +<​code>​bash-4.2$ which python
 +/​usr/​bin/​python
 +
 +$ cat .conda3old_jyp.sh
 +# Conda initialization by JYP, OLD style
 +#
 +# Use this for working with conda and CDAT centrally managed by JYP
 +#
 +# Execute this file in a BASH shell with
 +#     ​source path/​this_file
 +# Then get the list of available python distributions with
 +#     conda env list
 +# Then activate a specific distribution with
 +#     ​source activate version_name
 +#
 +# More details in:
 +#   ​https://​wiki.lsce.ipsl.fr/​pmip3/​doku.php/​other:​python:​starting#​conda-based_versions_of_uv-cdat
 +#   ​https://​wiki.lsce.ipsl.fr/​pmip3/​doku.php/​other:​uvcdat:​conda_notes
 +#
 +# Jean-Yves Peterschmitt - LSCE - 11/2018
 +
 +export PATH="/​home/​share/​unix_files/​cdat/​miniconda3/​bin:​$PATH"​
 +
 +# Use the alias below to easily determine where your python
 +# interpreter is located
 +alias wp="​which python"​
 +
 +# Where are ALL the python interpreters in the search path
 +alias wpa="​which -a python"​
 +
 +# The end
 +
 +$ source ~jypeter/​.conda3old_jyp.sh
 +
 $ wp $ wp
 /​home/​share/​unix_files/​cdat/​miniconda3/​bin/​python /​home/​share/​unix_files/​cdat/​miniconda3/​bin/​python
Line 98: Line 206:
 ==== Installing CDAT 8.0 ==== ==== Installing CDAT 8.0 ====
  
-<​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
 # Generate the list of installed packages # Generate the list of installed packages
-conda list -n cdat-8.0_py2 > /​home/​scratch01/​jypeter/​cdat-8.0_py2_list_181108.txt</​code>​+conda list -n cdat-8.0_py2 > /​home/​scratch01/​jypeter/​cdat-8.0_py2_list_181108.txt</​code>​
  
 List of installed packages: {{:​other:​uvcdat:​cdat_conda:​cdat-8.0_py2_list_181108.txt}} List of installed packages: {{:​other:​uvcdat:​cdat_conda:​cdat-8.0_py2_list_181108.txt}}
other/uvcdat/cdat_conda/cdat_8_0_py2.txt · Last modified: 2021/02/27 13:55 by jypeter