下载Anaconda
wegt https://repo.anaconda.com/archive/Anaconda3-2021.05-Linux-x86_64.sh
安装
bash Anaconda3-2021.05-Linux-x86_64.sh
#查看当前环境列表
conda env list
新建立环境,注意必须python和3.6之间不可以有空格 不加python版本号的话 不会生产bin等文件夹
conda create -n test01 python 3.7
test01 是 env_name
进入env_name环境
conda activate test01 source activate test01 pytorch
换清华源 提高下载速度
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/ conda config --set show_channel_urls yes#下载时显示文件来源
官网中 下载指令
conda install pytorch torchvision cudatoolkit 10.1 -c pytorch
去掉-c后面部分 它指定默认地址下属路径 若不删掉 他就又去default地址找资源了
conda install pytorch torchvision cudatoolkit 10.1



