怎么用conda下载清华源的pytorch(自带cuda的版本)

1,添加镜像源

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main

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/r

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
Anaconda 添加清华镜像源_conda添加清华源_小金~~的博客-CSDN博客

2,打开 ~/.condarc

把原来的删除,把下面的填进去

复制代码
channels:
  - 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/pkgs/free/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
auto_activate_base: false
show_channel_urls: true

3,执行这个命令

复制代码
conda install pytorch=1.12.1 cudatoolkit=11.6

conda 清华源安装 PyTorch CUDA 版本 - 知乎

4,验证

import torch

torch.cuda.is_available()

个人理解:

pytorch 是要安装的

cuda也要安装

但是有的pytorch安装的时候会把cuda一块安好,不用自己装了

相关推荐
机器之心9 分钟前
字节Seedream 4.0将全量开放!抢先评测来了,我们摸索出AI生图一大波「邪修」玩法
人工智能·openai
空白到白13 分钟前
机器学习-集成学习
人工智能·机器学习·集成学习
水凌风里14 分钟前
4.4 机器学习 - 集成学习
人工智能·机器学习·集成学习
雲_kumo14 分钟前
集成学习:从理论到实践的全面解析
人工智能·机器学习·集成学习
用户51914958484523 分钟前
30条顶级APT与蓝队攻防单行命令:网络战场终极对决
人工智能·aigc
双向3324 分钟前
AI 辅助文档生成:从接口注释到自动化 API 文档上线
人工智能
算法打盹中44 分钟前
基于树莓派与Jetson Nano集群的实验边缘设备上视觉语言模型(VLMs)的性能评估与实践探索
人工智能·计算机视觉·语言模型·自然语言处理·树莓派·多模态·jetson nano
卿·静1 小时前
Node.js对接即梦AI实现“千军万马”视频
前端·javascript·人工智能·后端·node.js
YangYang9YangYan1 小时前
2025年金融专业人士职业认证发展路径分析
大数据·人工智能·金融