win10 anaconda 安装 pytorch gpu

首先建立环境

conda create -n torch

切换环境

conda activate torch

换源

conda config --add channels https://repo.continuum.io/pkgs/free/ 
conda config --add channels https://repo.continuum.io/pkgs/main/ 
conda config --set show_channel_urls yes
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/

安装

conda install pytorch torchvision

这里注意一定不能用

conda install pytorch torchvision -c pytorch

因为-c指定是从官方源获取库

发布了142 篇原创文章 · 获赞 53 · 访问量 20万+

猜你喜欢

转载自blog.csdn.net/qq_23301703/article/details/102679121