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

相关推荐
数据智研13 分钟前
【数据分享】300个城市-5G试点城市DID数据(2014-2025)
大数据·运维·人工智能·信息可视化·数据分析
一水鉴天15 分钟前
词、术语、概念:从特征集收束到统一拓扑变换的升格与降格模型 20260915(豆包)
开发语言·人工智能
honsor15 分钟前
工业级网口温湿度变送器 ModbusTCP 机房动环环境监测终端
运维·网络·人工智能·物联网·安全·云计算·智能温湿度监测系统
benbenAItalk22 分钟前
真人克隆数字人的素材与成品视频生成:还原度和批量稳定性怎么控?
人工智能·科技·音视频
nanawinona23 分钟前
搜索“2026年量化开发”时,先看规则是否足够清楚
人工智能·python
johnsong28 分钟前
GPT-6 Astra 的能力数字与对齐声明:哪些能信
人工智能·语言模型
qq_2147826129 分钟前
再见Visio,再见draw.io,又一个画图Skill
人工智能·机器学习·draw.io
倔强的石头10630 分钟前
【深度学习】词嵌入技术_从Word2Vec到现代Embedding
人工智能·深度学习·机器学习
明月_清风38 分钟前
用自然语言控制 Blender:开源项目 Blender MCP 深度介绍
人工智能·后端