tensorflow-gpu安装好导入,一直出现以下错误

折腾了好久。

错误之前也按照中国官网安装及配置各环境变量:https://tensorflow.google.cn/install/gpu

其次基于anaconda+Python3.7安装tensorflow_gpu-2.2.0-cp37也安装成功。

但import tensorflow as tf总出现以下错误。

ImportError                               Traceback (most recent call last)
D:\soft\anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in <module>
57
---> 58 from tensorflow.python.pywrap_tensorflow_internal import *
59 D:\soft\anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py in <module>
27 return _mod
---> 28 _pywrap_tensorflow_internal = swig_import_helper()
29 del swig_import_helper D:\soft\anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py in swig_import_helper()
23 try:
---> 24 _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
25 finally: D:\soft\anaconda3\lib\imp.py in load_module(name, file, filename, details)
241 else:
--> 242 return load_dynamic(name, filename, file)
243 elif type_ == PKG_DIRECTORY: D:\soft\anaconda3\lib\imp.py in load_dynamic(name, path, file)
341 name=name, loader=loader, origin=path)
--> 342 return _load(spec)
343 ImportError: DLL load failed: 找不到指定的模块。 During handling of the above exception, another exception occurred: ImportError Traceback (most recent call last)
<ipython-input-1-64156d691fe5> in <module>
----> 1 import tensorflow as tf D:\soft\anaconda3\lib\site-packages\tensorflow\__init__.py in <module>
39 import sys as _sys
40
---> 41 from tensorflow.python.tools import module_util as _module_util
42 from tensorflow.python.util.lazy_loader import LazyLoader as _LazyLoader
43 D:\soft\anaconda3\lib\site-packages\tensorflow\python\__init__.py in <module>
48 import numpy as np
49
---> 50 from tensorflow.python import pywrap_tensorflow
51
52 # Protocol buffers D:\soft\anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in <module>
67 for some common reasons and solutions. Include the entire stack trace
68 above this error message when asking for help.""" % traceback.format_exc()
---> 69 raise ImportError(msg)
70
71 # pylint: enable=wildcard-import,g-import-not-at-top,unused-import,line-too-long ImportError: Traceback (most recent call last):
File "D:\soft\anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "D:\soft\anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "D:\soft\anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "D:\soft\anaconda3\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "D:\soft\anaconda3\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed: 找不到指定的模块。 Failed to load the native TensorFlow runtime. See https://www.tensorflow.org/install/errors for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.

解决方法:

卸载。换版本,pip install tensorflow-gpu==1.15.0

成功:

 

tensorflow-gpu安装遇到的坑的更多相关文章

  1. TensorFlow DeepLab教程初稿-tensorflow gpu安装教程

    TensorFlow DeepLab教程初稿-tensorflow gpu安装教程 商务合作,科技咨询,版权转让:向日葵,135-4855__4328,xiexiaokui#qq.com Summar ...

  2. tensorflow -gpu安装,史上最新最简单的途径(不用自己装cuda,cdnn)

    tensorflow -gpu安装首先,安装Anoconda1. 官网下载点我: 2.安装 点击 python 3.6 version自动下载x64版,下载好之后,然后安装. 如图,打上勾之后,一路n ...

  3. 【转】Ubuntu 16.04安装配置TensorFlow GPU版本

    之前摸爬滚打总是各种坑,今天参考这篇文章终于解决了,甚是鸡冻\(≧▽≦)/,电脑不知道怎么的,安装不了16.04,就安装15.10再升级到16.04 requirements: Ubuntu 16.0 ...

  4. Ubuntu 16.04 + CUDA 8.0 + cuDNN v5.1 + TensorFlow(GPU support)安装配置详解

    随着图像识别和深度学习领域的迅猛发展,GPU时代即将来临.由于GPU处理深度学习算法的高效性,使得配置一台搭载有GPU的服务器变得尤为必要. 本文主要介绍在Ubuntu 16.04环境下如何配置Ten ...

  5. Win10上安装Keras 和 TensorFlow(GPU版本)

    一. 安装环境 Windows 10 64bit  家庭版 GPU: GeForce GTX1070 Python: 3.5 CUDA: CUDA Toolkit 8.0 GA1 (Sept 2016 ...

  6. ubuntu16.04下安装TensorFlow(GPU加速)----详细图文教程【转】

    本文转载自:https://blog.csdn.net/zhaoyu106/article/details/52793183 le/details/52793183 写在前面 一些废话 接触深度学习已 ...

  7. Google TensorFlow for GPU安装、配置大坑

    Google TensorFlow for GPU安装.配置大坑 从本周一开始(12.05),共4天半的时间,终于折腾好Google TensorFlow for GPU版本,其间跳坑无数,摔得遍体鳞 ...

  8. 备注: ubt 16.04 安装 gtx 1060 --- 成功运行 tensorflow - gpu

    ---------------------------------------------------------------------------------------------------- ...

  9. win10系统下安装TensorFlow GPU版本

    首先要说,官网上的指南是最好的指南. https://www.tensorflow.org/install/install_windows 需要FQ看. 想要安装gpu版本的TensorFlow.我们 ...

  10. 通过Anaconda在Ubuntu16.04上安装 TensorFlow(GPU版本)

    一. 安装环境 Ubuntu16.04.3 LST GPU: GeForce GTX1070 Python: 3.5 CUDA Toolkit 8.0 GA1 (Sept 2016) cuDNN v6 ...

随机推荐

  1. 跳板攻击之:dns2tcp

    跳板攻击之:dns2tcp 目录 跳板攻击之:dns2tcp 1 dns2tcp简介 2 dns2tcp 食用说明 2.1 dns2tcpd 服务端 2.1.1 服务端参数说明 2.1.2 配置文件 ...

  2. MogDB 学习笔记之 -- 索引失效

    [[toc]]# 概念描述哪些操作会导致分区表的全局索引失效(比如 move partition,drop partition ,truncate partition ,split partition ...

  3. 【研究生学习】Turbo编码

    卷积码编译码 Turbo码编译码 原始文献阅读 最早记录Turbo编码的论文是NEAR SHANNON LIMIT ERROR - CORRECTING CODING AND DECODING :TU ...

  4. mybatis动态标签——trim

    <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "- ...

  5. 洛谷P4726 【模板】多项式指数函数(多项式 exp)

    题目 https://www.luogu.com.cn/problem/P4726 思路 (略) 是个板题,但是包含了很多多项式的基础板子,适合用来练手. 据说递归版的好写(好抄),但是我猜测和fft ...

  6. tdlib成功编译版本20230205(java)

    tdjni是java本地调用接口dll文件夹下的三个动态链接是供tdjni调用的使用时这三个加到系统环境变量里 编译文件在本人的文件里,可以下载

  7. 打卡ts day02--使用typescript 写评论demo

    demo.ts // DataHelpler 类 用于操作localStorage class DataHelpler { dataKey: string; //localstorage key pr ...

  8. Cocos Creator微信登录接入(完全小白教程)(安卓篇)

    1:创建 Creator项目,如下

  9. Transformers Pipelines

    pipelines 是使用模型进行推理的一种很好且简单的方法.这些pipelines 是从库中抽象出大部分复杂代码的对象,提供了一个简单的API,专门用于多个任务,包括命名实体识别.屏蔽语言建模.情感 ...

  10. 2022-04-28内部群每日三题-清辉PMP

    1.为了降低项目的质量成本(COQ)并增加验收产品的几率,需要进行质量审计.质量审计需要什么? A.质量管理计划和质量测量指标 B.过程分析 C.质量管理计划和质量核对单 D.过程决策程序平图(PDP ...