0
点赞
收藏
分享

微信扫一扫

3050ti安装TensorFlow与Pytorch

扶摇_hyber 2022-01-21 阅读 116

电脑环境:在这里插入图片描述472.47
在这里插入图片描述11版本cuda

1.首先在已有的anaconda环境下建立新的虚拟环境。
conda create -n third_env python=3.7
conda activate third_env

2.然后下载cuda11.2以及对应的cudnn,
安装cuda11.2,自定义,不勾选visual studio
其他默认下一步安装
安装检查:
nvcc -V
出现cuda 11.2即安装成功cuda

3.接着将cudnn解压后复制到v11.2目录下
配置环境变量-系统变量
在这里插入图片描述
即安装好cudnn

4.TensorFlow安装,在建好的虚拟环境下,输入命令:
pip install tensorflow-gpu==2.5

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
安装完成
5.新建环境,安装Pytorch
启动虚拟环境后,输入:
pip3 install torch1.9.0+cu111 torchvision0.10.0+cu111 torchaudio===0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
在这里插入图片描述

安装成功后,进入python环境,进行测试即可。
安装感受:在网好的情况下安装,确认好电脑版本,要下载的cuda版本,对应的TensorFlow版本,Pytorch版本再安装,不然会出现版本不匹配问题。

举报

相关推荐

0 条评论