一.下载Anaconda
二.添加清华镜像
# 添加清华镜像
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 --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/peterjc123/
conda config --set show_channel_urls yes
如果添加不成功或者其他bug,建议在C盘下找到.condarc.txt文件,输入如下配置
channels:
conda create --name pytorch python=3.7
activate pytorch
4.安装pytorch(注意版本对应)
找到相匹配的cuda版本填如下面 cudatoolkit=
conda install pytorch torchvision cudatoolkit=??
手机扫一扫
移动阅读更方便
你可能感兴趣的文章