Linux conda tensorflow-gpu安装及Not creating XLA devices, tf_xla_enable_xla_devices not set相关问题解决
0、首先介绍一下conda创建虚拟环境的基本操作。
(1)创建Python的虚拟环境,并指定Python版本,不指定的话会使用默认的版本(Conda Base 环境中的Python版本)。
conda create -n grape python=3.8.8 # grape可以指定为自己想要的名字
(2)进入创建好的虚拟环境。
conda activate grape
(3)退出当前Anaconda虚拟环境,在当前环境中执行以下指令。
conda deactivate
(4)删除这个虚拟环境
conda remove -n grape --all
出现Not creating XLA devices, tf_xla_enable_xla_devices not set
问题,一般是由于tensorflow和cuda、cuddn的版本问题。建议直接花几分钟重新配置环境,以下有两种方法安装tensorflow。
1、直接用conda create一个相应版本的tensorflow-gpu虚拟环境。
conda create -n tf tensorflow-gpu==2.2.0
在安装过程中会自己安装相应的cuda、cuddn包。
2、安装需要的cuda和cudnn环境,再安装tensorflow-gpu。
首先我们需要确定我们需要的tensorflow-gpu的版本,再在tensorflow找到对应的cuda和cudnn版本。网上部分帖子里面的不太对,还是自己去官网看比较靠谱。
https://tensorflow.google.cn/install/source#install_the_package
以tensorflow-gpu-2.2.0为例。
(1)首先创建一个python虚拟环境并激活
conda create -n grape python=3.8.8
conda activate grape
(2)在环境中安装cuda
conda install cudatoolkit=10.1 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64/
(3)在环境中安装cudnn
conda install cudnn=7.6.5 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64/
(4)安装tensorflow-gpu-2.2.0
conda install tensorflow-gpu-2.2.0
有问题欢迎留言交流。
Linux conda tensorflow-gpu安装及Not creating XLA devices, tf_xla_enable_xla_devices not set相关问题解决相关推荐
- 安装Tensorflow 报错false Not creating XLA devices, tf_xla_enable_xla_devices not set
学习图像识别配置环境 https://blog.csdn.net/weixin_44170512/article/details/103990592 一步一步按照博主配置 执行到这两句 import ...
- 彻底解决conda环境下 tensorflow gpu版本出现的问题:Not creating XLA devices, tf_xla_enable_xla_devices not set
问题说明 tf.test.is_gpu_available()结果为TRUE,但有Not creating XLA devices, tf_xla_enable_xla_devices not set ...
- tensorflow:Not creating XLA devices, tf_xla_enable_xla_devices not set
运行代码出现 I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_d ...
- win10系统tensorflow2.4.0-gpu安装“Not creating XLA devices, tf_xla_enable_xla_devices not set”解决方法
未解决前报错 最近在安装tensorflow2.4.0-gpu版本后的项目开发过程中出现了"Not creating XLA devices, tf_xla_enable_xla_dev ...
- 解决:Not creating XLA devices, tf_xla_enable_xla_devices not set
解决:Not creating XLA devices, tf_xla_enable_xla_devices not set 实验环境 提示如下 分析原因 解决方法 实验环境 Windows 10 N ...
- Ubuntu18解决:Not creating XLA devices, tf_xla_enable_xla_devices not set
实验环境 ubuntu18 NVIDIA GeForce GTX 1050 CUDA11.0 CUDNN 8.0 Tesorflow-gpu 2.4.1 问题 分析原因 据说是Tesorflow-gp ...
- Not creating XLA devices, tf_xla_enable_xla_devices not set错误求助
在pycharm中跑代码出现 在调试的时候出现了Not creating XLA devices, tf_xla_enable_xla_devices not set,但是测试的时候却是显示true ...
- 【Error】解决:Not creating XLA devices, tf_xla_enable_xla_devices not set
提示如下 分析原因 据说是Tesorflow-gpu 2.4.1,默认情况下,不再注册XLA:CPU和XLA:GPU设备.如果确实需要它们,请可使用 os.environ['TF_XLA_FLAGS' ...
- CUDA安装 + tensorflow gpu版本出现的问题:Not creating XLA devices, tf_xla_enable_xla_devices not set
装完后用以下两行代码测试,结果竟然是False,输出了图片中的报错,肯定是哪装的有问题 import tensorflow as tf tf.test.is_gpu_available() 我的ten ...
最新文章
- 新JEP将简化Java类型变异
- 【机器视觉】 for算子
- bind9局域网其他用户不能解析_linux dns server bind9 内网域名解析
- 3. 线性表的链式结构
- C#服务启动以及服务指令
- 3月国内网民地域分布TOP12:广东雄踞榜首 涨幅1.59%
- ip pv uv及相应统计shell
- ProtoBuf生成EmmyLua注解API提示文件(支持复杂的嵌套结构)
- 《统计会犯错——如何避免数据分析中的统计陷阱》导读
- STM32之字模软件的使用
- mysql分区替换,MySQL交换分区的实例详解
- 地壳中元素含量排名记忆口诀_地壳含量_地壳中元素含量排名口诀
- 微信小程序入门与实战笔记
- 业务需求、用户需求、功能需求、非功能需求
- 计算机网络的ask表示啥,计算机网络理论知识:物理层
- C#chart绘折线图动态添加数据
- Java itext实现图片转pdf
- SpringFox 学习
- SonTek -Argonaut-SL500流量计适配调试说明
- python商品打折问题_利用Python“解剖”双11商家打折套路