新建python-env_install.sh文件,写入如下内容:
#! /usr/bin/bash
# 国内采用清华源安装,国外注释下列代码,使用官方源
# ————————————————————————————
# wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2019.07-Linux-x86_64.sh
# chmod u+x Anaconda3-2019.07-Linux-x86_64.sh
# sh Anaconda3-2019.07-Linux-x86_64.sh
# ~/anaconda3/bin/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
# ~/anaconda3/bin/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
# ~/anaconda3/bin/conda config --set show_channel_urls yes
# ————————————————————————————
# 官方源安装
# ————————————————————————————
wget https://repo.anaconda.com/archive/Anaconda3-2019.07-Linux-x86_64.sh
chmod u+x Anaconda3-2019.07-Linux-x86_64.sh
sh Anaconda3-2019.07-Linux-x86_64.sh
~/anaconda3/bin/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
~/anaconda3/bin/conda config --