Strumenti Utente

Strumenti Sito


calcoloscientifico:cluster:softwareapplicativo:conda_user

Differenze

Queste sono le differenze tra la revisione selezionata e la versione attuale della pagina.

Link a questa pagina di confronto

Entrambe le parti precedenti la revisioneRevisione precedente
Prossima revisione
Revisione precedente
calcoloscientifico:cluster:softwareapplicativo:conda_user [18/03/2021 11:57] fabio.spatarocalcoloscientifico:cluster:softwareapplicativo:conda_user [16/01/2025 17:02] (versione attuale) fabio.spataro
Linea 18: Linea 18:
 CONDAENV_NAME='template' CONDAENV_NAME='template'
 CONDAENV_VERSION=$(date '+%Y.%m.%d') CONDAENV_VERSION=$(date '+%Y.%m.%d')
-PYTHON_VERSION='3.6'+PYTHON_VERSION='3.9'
  
 CONDAENV="${CONDAENV_NAME}-${CONDAENV_VERSION}" CONDAENV="${CONDAENV_NAME}-${CONDAENV_VERSION}"
Linea 38: Linea 38:
     CONDAENV_PREFIX="$CONDA_ENVS_PATH/$CONDAENV"     CONDAENV_PREFIX="$CONDA_ENVS_PATH/$CONDAENV"
     CONDAENV_SYMLNK="$CONDA_ENVS_PATH/$CONDAENV_NAME"     CONDAENV_SYMLNK="$CONDA_ENVS_PATH/$CONDAENV_NAME"
 +fi
 +
 +if [ $UID = 0 ]; then
 +    conda --version
 +    conda update conda
 +    conda --version
 +    echo
 fi fi
  
Linea 43: Linea 50:
 echo "CONDAENV_SYMLNK: $CONDAENV_SYMLNK" echo "CONDAENV_SYMLNK: $CONDAENV_SYMLNK"
 echo echo
-echo -n "Should we proceed with the creation of the condaenv '$CONDAENV_NAME' (yes/no)? "+ 
 +if [ -d "$CONDAENV_PREFIX" ]; then 
 +    echo -n "Should we remove the already existing condaenv '$CONDAENV_NAME' (yes/no)? " 
 + 
 +    read ans 
 + 
 +    case "$ans" in 
 +        [yY]|[yY][Ee][Ss]) 
 +        conda env remove --name "$CONDAENV" 
 +        ;; 
 +        [nN]|[nN][oO]) 
 +        ;; 
 +        *) 
 +        echo 
 +        exec "$0" 
 +        exit 
 +        ;; 
 +    esac 
 +fi 
 + 
 +if [ -d "$CONDAENV_PREFIX" ]; then 
 +    echo -n "Should we proceed with the modification of the condaenv '$CONDAENV_NAME' (yes/no)? " 
 +else 
 +    echo -n "Should we proceed with the creation of the condaenv '$CONDAENV_NAME' (yes/no)? " 
 +fi
  
 read ans read ans
Linea 62: Linea 93:
 conda info conda info
  
-if [ $UID = 0 ]; then +if [ ! -d "$CONDAENV_PREFIX" ]; then 
-    conda --version +    conda create --yes --prefix "$CONDAENV_PREFIX" python${PYTHON_VERSION:+=$PYTHON_VERSION}
-    conda update conda +
-    conda --version+
 fi fi
- 
-if [ -d "$CONDAENV_PREFIX" ]; then 
-    conda env remove --name "$CONDAENV" 
-fi 
- 
-conda create --yes --name "$CONDAENV" python=$PYTHON_VERSION 
  
 conda activate "$CONDAENV" conda activate "$CONDAENV"
  
 conda install --yes --name "$CONDAENV" \ conda install --yes --name "$CONDAENV" \
---channel conda-forge \ +    --channel conda-forge \ 
-xz+    xz
  
 conda list || true conda list || true
Linea 117: Linea 140:
 ==== Working with conda ==== ==== Working with conda ====
  
-With conda, you can create, export, list, remove, and update [[https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#building-identical-conda-environments|environments]] that have different versions of Python and/or packages installed in them. Switching or moving between environments is called activating the environment.+With conda, you can create, export, list, remove, and update that have different versions of Python and/or packages installed in them. Switching or moving between environments is called activating the environment.
  
 === Interactive work session === === Interactive work session ===
Linea 162: Linea 185:
 === Alternate channels === === Alternate channels ===
  
-To search for alternate channels that may provide the conda package you're looking for, navigate to [[https://anaconda.org]] and use the search bar at the top of the page.+To search for alternate channels that may provide the conda package you're looking for, navigate to [[https://anaconda.org|anaconda.org]] and use the search bar at the top of the page.
  
 To add a new channel: To add a new channel:
calcoloscientifico/cluster/softwareapplicativo/conda_user.1616065078.txt.gz · Ultima modifica: 18/03/2021 11:57 da fabio.spataro

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki