Linux下普通用户anaconda安装与配置
1、下载.sh文件:
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2021.05-Linux-x86_64.sh
2、bash XXX.sh
然后就会安装到anaconda3这个文件夹下面
3、终端conda自动激活
打开.bashrc,在最后输入如下代码:(注意改成自己的路径)
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/xtx/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/xtx/anaconda3/etc/profile.d/conda.sh" ]; then
. "/home/xtx/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/home/xtx/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
4、换源
conda config --add channels
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ conda config
--set show_channel_urls yes
更换所有库
conda update –all
更换conda自身
conda update conda