Windows无NVIDIA GUP情况的PyTorch 安装(cpuonly)

  • Anaconda安装:略
  • 查看Windows是否有NVIDIA显卡
    在这里插入图片描述
    如果有NVIDIA显卡的需要安装CUDA以获取GPU加速。以下是PyTorch官网的一句话

PyTorch can be installed and used on various Windows distributions. Depending on your system and compute requirements, your experience with PyTorch on Windows may vary in terms of processing time. It is recommended, but not required, that your Windows system has an NVIDIA GPU in order to harness the full power of PyTorch’s CUDA support.

  • 访问PyTorch官网,获取安装命令(CUDA 选择 None)并安装
    在这里插入图片描述

    • 可以看到安装命令为:conda install pytorch torchvision torchaudio cpuonly -c pytorch,但是由于国内下载比较慢,安装前我们可以配置国内源:
      在这里插入图片描述
      # 配置国内源,方便安装Numpy,Matplotlib等
      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/
      # 配置国内源,安装PyTorch用
      conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
      # 显示源地址
      conda config --set show_channel_urls yes
      
    • 要使用国内源,需要去掉-c pytorch,即cmd输入:conda install pytorch torchvision torchaudio cpuonly
      在这里插入图片描述
      在这里插入图片描述
  • 检查是否安装成功
    在这里插入图片描述

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值