首页 > 编程语言 > 详细

安装pytorch相对容易的方法+python3.6版本下+CPU版本

时间:2020-05-25 00:13:52      阅读:285      评论:0      收藏:0      [点我收藏+]
  1. 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/cloud/conda-forge
 
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
 
 
 
# 设置搜索时显示通道地址
 
conda config --set show_channel_urls yes

科大源

conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
 
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
 
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
 
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/msys2/
 
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/
 
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/menpo/
 
 
 
conda config --set show_channel_urls yes
  1. 安装CPU版本的pytorch
pip install http://download.pytorch.org/whl/cpu/torch-0.4.0-cp36-cp36m-win_amd64.whl
pip install torchvision
  1. 运行结果

技术分享图片

  1. 如果遇到因为各个包之间版本不匹配,输入命令
conda update --all

安装pytorch相对容易的方法+python3.6版本下+CPU版本

原文:https://www.cnblogs.com/mengxiaoleng/p/12953636.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!