conda使用activate提示Error: argument COMMAND: invalid choice: ‘activate‘
环境:
windows11
conda 23.7.4
现象
PS F:\Desktop> conda activate ragflow
usage: conda-script.py [-h] [--no-plugins] [-V] COMMAND ...
conda-script.py: 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', 'verify', 'repo', 'server', 'pack', 'env', 'token')
解决方法
# 管理员运行powershell,重置conda环境
conda init --system --all
# 重开powershell恢复正常
(base) PS F:\Desktop> conda activate ragflow
(ragflow) PS F:\Desktop>