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

相关推荐
亚马逊云开发者8 小时前
【Bedrock AgentCore】AI Agent 回答不一致怎么办?双 Memory 架构实现服务标准化(附完整代码)
大数据·人工智能·架构
悟纤8 小时前
Seedance 2.0 API 已上线 | 支持「人像视频生成」|支持100并发 | 满血版 [灵龙AI API]
人工智能·音视频·seedance 2.0
男孩李8 小时前
什么是workbuddy
人工智能·语言模型
人工智能AI技术8 小时前
终身学习 Agent:积累知识、不遗忘、可进化
人工智能
DFCED8 小时前
突发!Sora 之父 Bill Peebles 离职:OpenAI 理想主义的又一次落幕
人工智能·大模型·agent·sora
_Evan_Yao8 小时前
RAG中的“Chunk”艺术:我试过10种切分策略后总结的结论
java·人工智能·后端·python·软件工程
拾薪8 小时前
[SuperPower] Brainingstorm - 流程控制架构分析
网络·人工智能·ai·架构·superpower·brainstorming
AI自动化工坊8 小时前
SemaClaw开源框架实践指南:从提示工程到安全工程的AI代理基础设施变革
人工智能·开源·ai agent·semaclaw
今天你TLE了吗9 小时前
LLM到Agent&RAG——AI概念概述 第二章:提示词
人工智能·笔记·后端·学习
找方案9 小时前
AI 视觉创作工具 Claude Design 来了!Anthropic 的野心远不止 AI 作图
人工智能·原型设计·ai工具·claude design