下载
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-5.3.1-Linux-x86_64.sh --no-check-certificate
安装
bash Anaconda3-5.3.1-Linux-x86_64.sh -p /home/anaconda
# <!--此时如果爆出readonly file的错误,则需要在docker run的时候添加上--privileged参数-->
配置环境变量
source /home/anaconda/etc/profile.d/conda.sh
# <!--或者将上面步骤3的加入到bashrc的最后,再进行source:source ~/.bashrc
常见命令
conda update -n base conda //update最新版本的conda
conda create -n xxxx python=3.5 //创建python3.5的xxxx虚拟环境
conda activate xxxx //开启xxxx环境
conda deactivate //关闭环境
conda env list //显示所有的虚拟环境
conda remove -n ** --all //删除**环境