Bootstrap

最新版anaconda的activate命令激活环境报错 usage: conda-script.py [-h] [--no-plugins] [-V] COMMAND ...

报错内容

在这里插入图片描述

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’, ‘repo’, ‘pack’, ‘server’, ‘verify’, ‘token’, ‘env’)

解决方法

方法1

  1. 输入 conda init
  2. 关闭终端,再重开一个
  3. 再次输入 conda activate 环境名

方法二

使用source activate 环境名

退出环境还是conda deactivate

;