记录搭配环境

本文提供了CUDA、cuDNN以及PyTorch和torchvision的下载及安装步骤,包括使用Anaconda进行环境配置,以及遇到问题如importtorchvision时的解决方法,如卸载并重新安装Pillow。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在这里插入图片描述
cuda下载https://developer.nvidia.com/cuda-toolkit-archive

cudnn下载https://developer.nvidia.com/cudnn
cudatoolkit安装包地址:https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64/
Pytorch和torchvision安装包地址:https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/win-64/

conda create -n pytorch1.7.1-gpu python=3.8在这里插入图片描述

activate pytorch1.7.1-gpu
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/main/
conda config --set show_channel_urls yes
conda install C:\Users\DELL\Downloads\torchvision-0.8.2-py38_cu110.tar.bz2
conda install C:\Users\DELL\Downloads\pytorch-1.7.1-py3.8_cuda110_cudnn8_0.tar.bz2

在这里插入图片描述

conda install C:\Users\DELL\Downloads\cudatoolkit-11.0.221-h74a9793_0.tar.bz2
conda install pytorch1.7.1 torchvision0.8.2 torchaudio==0.7.2 cudatoolkit=11.0 -c pytorch在这里插入图片描述

conda update -n base -c defaults conda在这里插入图片描述

conda install pytorch1.7.1 torchvision0.8.2 torchaudio==0.7.2 cudatoolkit=11.0 -c pytorch
在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

import torchvision 时遇到问题
在这里插入图片描述
解决方法
卸载重新安装pillow
在这里插入图片描述

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值