-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
I was following the instructions here for setting up Jupyterlab but was getting the following error when trying to activate the environment:
[..]$ conda activate conda/env_jupyter/
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', 'token', 'env', 'repo', 'pack', 'server', 'verify')It turned out I needed to use conda init bash which made the following change to my .bashrc:
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/hpcapps/lib-edda/easybuild/software/Anaconda3/2023.09-0/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/hpcapps/lib-edda/easybuild/software/Anaconda3/2023.09-0/etc/profile.d/conda.sh" ]; then
. "/hpcapps/lib-edda/easybuild/software/Anaconda3/2023.09-0/etc/profile.d/conda.sh"
else
export PATH="/hpcapps/lib-edda/easybuild/software/Anaconda3/2023.09-0/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<Once I restarted the shell/sourced .bashrc I was able to use conda activate.
Metadata
Metadata
Assignees
Labels
No labels