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

相关推荐
aneasystone本尊2 分钟前
使用 MCP 让 Claude Code 集成外部工具
人工智能
静心问道12 分钟前
SEW:无监督预训练在语音识别中的性能-效率权衡
人工智能·语音识别
xwz小王子18 分钟前
从LLM到WM:大语言模型如何进化成具身世界模型?
人工智能·语言模型·自然语言处理
我爱一条柴ya19 分钟前
【AI大模型】深入理解 Transformer 架构:自然语言处理的革命引擎
人工智能·ai·ai作画·ai编程·ai写作
静心问道20 分钟前
FLAN-T5:规模化指令微调的语言模型
人工智能·语言模型·自然语言处理
李师兄说大模型20 分钟前
KDD 2025 | 地理定位中的群体智能:一个多智能体大型视觉语言模型协同框架
人工智能·深度学习·机器学习·语言模型·自然语言处理·大模型·deepseek
静心问道21 分钟前
SqueezeBERT:计算机视觉能为自然语言处理在高效神经网络方面带来哪些启示?
人工智能·计算机视觉·自然语言处理
Sherlock Ma22 分钟前
百度开源文心一言4.5:论文解读和使用入门
人工智能·百度·自然语言处理·开源·大模型·文心一言·多模态
weisian15127 分钟前
人工智能-基础篇-18-什么是RAG(检索增强生成:知识库+向量化技术+大语言模型LLM整合的技术框架)
人工智能·语言模型·自然语言处理
DataCastle32 分钟前
第三届Bio-OS AI开源大赛启动会隆重举行
人工智能