pytorch安装(windows)

(1)下载pycharm

PyCharm: the Python IDE for Professional Developers by JetBrains

(2)下载anaconda

Anaconda | The World's Most Popular Data Science Platform

(3)创建一个新环境:torch

conda create -n torch -y

(4)进入新环境

conda activate torch

(5)加入清华源

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 --set show_channel_urls yes
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/

(6)安装pytorch

conda install pytorch torchvision torchaudio cudatoolkit=11.3 pytorch

(7)判断GPU是否可用

import torch
print(torch.cuda.is_available())
True

你可能感兴趣的:(windows,人工智能)