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

相关推荐
لا معنى له21 小时前
目标检测的内涵、发展和经典模型--学习笔记
人工智能·笔记·深度学习·学习·目标检测·机器学习
AKAMAI1 天前
Akamai Cloud客户案例 | CloudMinister借助Akamai实现多云转型
人工智能·云计算
小a杰.1 天前
Flutter 与 AI 深度集成指南:从基础实现到高级应用
人工智能·flutter
colorknight1 天前
数据编织-异构数据存储的自动化治理
数据仓库·人工智能·数据治理·数据湖·数据科学·数据编织·自动化治理
Lun3866buzha1 天前
篮球场景目标检测与定位_YOLO11-RFPN实现详解
人工智能·目标检测·计算机视觉
janefir1 天前
LangChain框架下DirectoryLoader使用报错zipfile.BadZipFile
人工智能·langchain
齐齐大魔王1 天前
COCO 数据集
人工智能·机器学习
AI营销实验室1 天前
原圈科技AI CRM系统赋能销售新未来,行业应用与创新点评
人工智能·科技
爱笑的眼睛111 天前
超越MSE与交叉熵:深度解析损失函数的动态本质与高阶设计
java·人工智能·python·ai
tap.AI1 天前
RAG系列(一) 架构基础与原理
人工智能·架构