赞
踩
执行“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')
如果已经在.bashrc设置了以下路径
export PATH=/home/royt/anaconda3/bin:$PATH
可以换成一下声明路径的方式
# >>> 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 <<<
编辑完之后输入“source ~/.bashrc”,之后即可activate自己的环境
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。