1. 删除配置的环境变量
sudo gedit ~/.bashrc
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/work3/ai_tool/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/work3/ai_tool/anaconda3/etc/profile.d/conda.sh" ]; then
. "/work3/ai_tool/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/work3/ai_tool/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
2. 删除安装目录的文件
进入/work3/ai_tool 目录,删除anaconda3 目录
3. 使环境变量生效
source ~/.bashrc