栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

Conda 虚拟环境 安装 tensorflow-gpu 2.6版

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Conda 虚拟环境 安装 tensorflow-gpu 2.6版

Conda虚拟环境安装tensorflow-gpu

注:博客内容具有时效性,笔者安装时使用conda search tensorflow-gpu没有找到对应依赖numpy版本在1.20以下的,故采用本博客中提到的方法。仍建议不要同时使用pypi和conda进行package的管理。

创建一个带有python的虚拟环境:
conda create -n tf2.6 python=3.8

激活虚拟环境:
conda activate tf2.6

使用pypi安装tensorflow-gpu==2.6:
pip install tensorflow-gpu==2.6 --user
【pypi会自动安装numpy==1.19.5和scipy==1.6.2;conda中多为numpy==1.21和scipy==1.7存在版本冲突】

安装cuda:
conda install cudatoolkit=11.3

安装cudnn:
conda install cudnn=8.2

【如果想使用keras可以直接from tensorflow import keras】

【以下为个人笔记,无需参考】
base

conda install nb_conda

tf2.6

conda install cudatoolkit=11.3
conda install cudnn=8.2
conda install -y jupyter
pip install -r requirements.txt --user
pip install -q git+https://github.com/tensorflow/docs

requirements.txt

tensorflow-gpu==2.6
opencv-python==4.5.3
pandas==1.3.3
matplotlib==3.4.3
imageio==2.9.0
imutils==0.5.4
tqdm==4.62.3
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/321906.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号