Linux 在miniconda和anaconda同时安装时,卸载miniconda
1. 找到miniconda目录,删除。
rm -rf miniconda3/
2. 编辑bashrc
sudo vim .bashrc
setup路径改回anaconda3的,注释掉“>>> conda initialize >>>”和"<<< conda initialize <<<"之间的miniconda的语句,并在最后加上"export PATH=~/home/用户名/anaconda3/bin:$PATH"
# >>> conda initialize >>> # !! Contents within this block are managed by 'conda init' !! __conda_setup="$('/home/deeplearning/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)" # if [ $? -eq 0 ]; then # eval "$__conda_setup" # else # if [ -f "/home/deeplearning/miniconda3/etc/profile.d/conda.sh" ]; then # . "/home/deeplearning/miniconda3/etc/profile.d/conda.sh" # else # export PATH="/home/deeplearning/miniconda3/bin:$PATH" # fi #fi #unset __conda_setup # <<< conda initialize <<<
export PATH=~/home/用户名/anaconda3/bin:$PATH
3. 重启环境变量
source ~/.bashrc
为了防止每次进Xshell的时候都要进行重启环境变量source ~/.bashrc
需要进入vim ~/.bash_profile文件输入
# 加载.bashrc文件 if test -f .bashrc ; then source .bashrc fi
4. 输入conda init,然后重启bash
参考: