ai4d-iasc / trixie

Scripts and documentation about trixie hpc
17 stars 4 forks source link

Failed to `conda activate unsloth.sl` #98

Open SamuelLarkin opened 4 months ago

SamuelLarkin commented 4 months ago

I'm trying to create a conda environment using the module anaconda3 but it fails.

module load anaconda3
conda create --name unsloth.sl python=3.10
...
Downloading and Extracting Packages

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate unsloth.sl
#
# To deactivate an active environment, use
#
#     $ conda deactivate

But if I try to activate the environment using the suggested way from the previous message

❯ conda activate unsloth.sl
usage: conda [-h] [--no-plugins] [-V] COMMAND ...
conda: error: argument COMMAND: invalid choice: 'activate' (choose from 'clean', 'compare', 'config', 'create', 'info', 'init', 'install', 'list', 'notices', 'package', 'remove', 'uninstall', 'rename', 'run', 'search', 'update', 'upgrade', 'build', 'content-trust', 'convert', 'debug', 'develop', 'doctor', 'index', 'inspect', 'metapackage', 'render', 'skeleton', 'server', 'env', 'token', 'pack', 'repo', 'verify')
❯ which conda
/gpfs/share/rhel9/opt/spack/opt/spack/linux-rhel9-skylake_avx512/gcc-11.3.1/anaconda3-2023.09-0-4njg4u3yrzcx3vtcl54zaf5fdghsxfcl/condabin/conda
rloveNRC commented 4 months ago

Doesn't look like your .bashrc has been updated by conda init and without that step I could re-produce the behaviour. Once I ran conda init and reloaded my shell then I could conda activate unsloth.sl successfully.