Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
anaconda [2020/05/26 18:30] – [SGE Example using anaconda environement] adminanaconda [2024/04/30 13:56] (Version actuelle) – admin
Ligne 9: Ligne 9:
 <code bash> <code bash>
 $ module avail lang/python/anaconda $ module avail lang/python/anaconda
-lang/python/anaconda/2.7 lang/python/anaconda/3.7+lang/python/anaconda/2.7 lang/python/anaconda/3.7 lang/python/anaconda/3.8
  
 </code> </code>
Ligne 16: Ligne 16:
  
 <code bash> <code bash>
-$ module load lang/python/anaconda/3.7+$ module load lang/python/anaconda/3.8
 </code> </code>
  
Ligne 28: Ligne 28:
 ===== Install new package===== ===== Install new package=====
  
-You may need to install additional package without having root access. We instead recommend building a ''virtual environment'' locally and install packages there.  +<note important> 
-  - Create a conda environment <code bash>$ conda create -y --prefix $WORK/conda-env</code> replace ''conda-env'' by a valid name. +**EDIT DEC 2023**\\ 
 +If you get errors ( related to ''GLILBC'') when installing packages with ''conda'' please follow this [[anaconda_sing|link]]. 
 +</note> 
 + 
 + 
 +<note important> 
 +**EDIT 2023**\\ 
 +The latest python version supported on the cluster is **3.7.4** 
 +You need to request this explicitly when creating a new conda env by  using this option: ''python=3.7.4'' 
 +</note> 
 + 
 +You may need to install additional package without having root access.  
 +We instead recommend building a ''virtual environment'' locally and install packages there.  
 +But before we need to tell conda to use ''WORK'' to store pkgs. Run commands below **only once** :  
 +<code bash>$ conda config --add pkgs_dirs $WORK/.conda/pkgs 
 +$ conda config --add envs_dirs $WORK/.conda/envs 
 +</code> 
 + 
 + 
 +  - Create a conda environment <code bash>$ conda create -y --prefix $WORK/conda-env python=3.7.4 </code> replace ''conda-env'' by a valid name. 
   - Activate the environment you just created <code bash>$ conda activate $WORK/conda-env  </code>   - Activate the environment you just created <code bash>$ conda activate $WORK/conda-env  </code>
-  - Download and install the conda package in the environment <code bash> $ conda install -c package</code> replace package by the package you wan to install, for example ''panda''+  - Download and install the conda package in the environment <code bash> $ conda install package</code> replace package by the package you wan to install, for example ''panda''
   - Run your analysis from **within** the environment   - Run your analysis from **within** the environment
   - Deactivating environment, once you are done with your analysis- you can deactivate the conda environment by running the command <code bash>$ conda deactivate</code>   - Deactivating environment, once you are done with your analysis- you can deactivate the conda environment by running the command <code bash>$ conda deactivate</code>
Ligne 37: Ligne 56:
 ==== SGE Example using anaconda environement ==== ==== SGE Example using anaconda environement ====
  
-Here is a simple SGE script that load anaconda 3.7, activate conda env called meso and then run a python program.+Here is a simple SGE script that load anaconda 3.7, activate conda env called conda-env and then run a python program.
  
  
Ligne 52: Ligne 71:
 module load lang/python/anaconda/3.7 module load lang/python/anaconda/3.7
  
-## load conda and activate env called meso and run conda program +## load conda, activate env called conda-env and run conda program
- +
-conda activate $WORK/conda/meso && python conda_Program.py+
  
 +conda activate $WORK/conda-env && python conda_Program.py
  
 </file>  </file> 
  
  
  • anaconda.1590517806.txt.gz
  • Dernière modification : 2020/05/26 18:30
  • de admin