I just fixed the issue. My question is what was worng?
OS: CentOS 8.
Build: Anaconda3-2023.07-2-Linux-x86_64.sh
Problem: After I create an environment correctly, and when I activate that created envroment I got error message as below:
conda activate parth
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', 'convert', 'debug', 'develop', 'doctor', 'index', 'inspect', 'metapackage', 'render', 'skeleton', 'verify', 'content-trust', 'repo', 'env', 'token', 'server', 'pack')
More information: conda --version; conda create --name; conda env list. All worked well. echo $PATH shows anaconda3 path well. Just activate enviroment didn’t work.
Tried reinstall, intall different version. All didn’t fix the issue.
Fixed solution: after I ran this, I can activate enviroment
source {path_to_anaconda}/anaconda3/etc/profile.d/conda.sh
Question: what was wrong? what this command does
source {path_to_anaconda}/anaconda3/etc/profile.d/conda.sh
I’m a beginer please explain to me in details. Thanks a lot!