ubuntu anaconda安装pytorch

清华conda源地址https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/,在里面可以查看pytorch和python版本的组合是否有资源
.condarc文件内容:

channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2

  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/menpo/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/simpleitk/
show_channel_urls: true

安装命令:https://pytorch.org/get-started/previous-versions/
比如:

# CUDA 10.0
conda install pytorch==1.0.0 torchvision==0.2.1 cuda100 

# CUDA 9.0
conda install pytorch==1.0.0 torchvision==0.2.1 cuda90 

# CUDA 8.0
conda install pytorch==1.0.0 torchvision==0.2.1 cuda80 

# CPU Only
conda install pytorch-cpu==1.0.0 torchvision-cpu==0.2.1 cpuonly 

你可能感兴趣的:(笔记,学习心得)