前后总共配置了三次tensorflow GPU版本,每次都刻骨铭心,这下子要好好做个笔记了!!
1-核查驱动是否正常
cmd命令
nvidia-smi
如果有显示,则说明ok,记得版本要大于450
如果没有就去下载,链接如下:
第一步:通过conda创建一个新的虚拟环境,采用python3.10版本
conda create -n tf210 python=3.10
第二步:首先安装依赖包,(因为之前我先安装tensorflow在安装依赖包,总是出现版本不匹配的问题)推荐使用阿里镜像,实测是真的快
(tf210) pip install matplotlib pandas notebook scikit-learn -i https://mirrors.aliyun.com/pypi/simple/
第三步:安装tessorflow2.10版本,也同样使用镜像源,也可以直接为pip配置默认镜像源
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
(tf210) pip insta