怎么用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一块安好,不用自己装了

相关推荐
码农飞哥28 分钟前
WorkBuddy 两个月没动,今晚测试红了 2 条
人工智能·效率·ai工具·workbuddy
硅谷秋水1 小时前
面向科学的科学AI智能体:任务、架构、评估与挑战综述
人工智能·科技·语言模型
叼烟扛炮1 小时前
[LangChain] 学习笔记(04):手搓 ChatGPT 打字机——流式输出(SSE)与模型初始化选型
人工智能·笔记·chatgpt·langchain
奶油话梅糖1 小时前
2,615 个知识点、3,003 条先修边:6,800 Star 的开源知识图谱,能顺着错题从高中回溯到小学
人工智能·知识图谱
seacracker1 小时前
不重造 S3 轮子:PowerFS 如何把 RustFS 变成自己的 S3 服务面
人工智能·kv存储·rustfs·powerfs·s3对象存储
IT_陈寒1 小时前
SpringBoot实战技巧总结
前端·人工智能·后端
lucas_AI2 小时前
Agent 基准也会烂:Terminal-Bench 三成任务有缺陷,修复后分数集体上涨 10 个点
人工智能·agent
AI源码2 小时前
基于深度学习的日常服饰分类与推荐系统设计
人工智能·深度学习·分类
johnsong10 小时前
AI前沿日报 · 2026-10-31 | 安全失守——当AI工具被下毒、当云端门户洞开
人工智能·安全
得帆低代码PaaS11 小时前
企业级 Agent 架构:MCP、Integration、数据与治理能力
大数据·人工智能·架构·ai agent·企业数字化·mcp