当前位置:   article > 正文

【Ubuntu】执行“conda activate”报错_usage: conda [-h] [--no-plugins] [-v] command ...

usage: conda [-h] [--no-plugins] [-v] command ... conda: error: argument com

执行“conda activate”报错

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', 'env', 'token', 'pack', 'repo', 'verify', 'server')
  • 1
  • 2

如果已经在.bashrc设置了以下路径

export PATH=/home/royt/anaconda3/bin:$PATH
  • 1

可以换成一下声明路径的方式

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/royt/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/home/royt/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/home/royt/anaconda3/etc/profile.d/conda.sh"
    else
        export PATH="/home/royt/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14

编辑完之后输入“source ~/.bashrc”,之后即可activate自己的环境

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号