自上篇系统重装后,Anaconda重新导入后终端进入conda环境报错:
conda-script.py: error: argument COMMAND: invalid choice: ‘activate’
C:\Windows\system32>conda activate xin
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', 'env', 'verify', 'token', 'repo', 'server', 'pack')
终端下输入
conda init --system --all
先执行conda init
,命令自动重置conda环境。然后退出终端,重新进入终端即可conda activate env
了