Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
which python

# load module

ml lang

ml Anaconda3Miniforge3

which python

conda create --name myenv python=3.9.5

conda activate myenv # won't work if shell integration hasn't been set up already

# shell integration

conda init

. $HOME/.bashrc # update shell

# or `source $(conda info --base)/etc/profile.d/conda.sh` for immediate + non-permanent

conda activate myenv # works now

which python

conda list

conda install numpy

# so far so good, but where is our environment (and the packages etc.) located?

conda env list

# it shouldn't live in $HOME but on the parallel FS

# how to resolve this?

#     1) provide `--prefix <path>` to `conda create` (and then full path to `conda activate`)

#     2) conda config --add envs_dirs /scratch/<group>/<username>/.conda/envs

#        conda config --add pkgs_dirs /scratch/<group>/<username>/.conda/pkgs

# let's recreate it properly...

conda deactivate myenv

# conda env remove --name myenv .... but let's just rm -rf $HOME/.conda

conda config --add envs_dirs /scratch/pc2-mitarbeiter/bauerc/.conda/envs

conda config --add pkgs_dirs /scratch/pc2-mitarbeiter/bauerc/.conda/pkgs

cat $HOME/.condarc

# (potentially) redo the above....

# then `which python`

...