可能的报错信息

  1. TensorFlow 下,导入这份配置的时候 python 停止运行

  2. ImportError: DLL load failed: 找不到指定的模块 或 ImportError: No module named ‘_pywrap_tensorflow’ 或 Failed to load the native TensorFlow runtime.

  3. importlib.import_module(mname)

等等类似的

我的出错配置

tensorflow_gpu-1.2.1

cudnn-8.0-windows7-x64-v6.0.0

或者cudnn-8.0-windows7-x64-v7.1

或者cudnn-8.0-windows7-x64-v7

以上的cudnn都是错误的,得使用
cudnn-8.0-windows7-x64-v5.1

下面说下怎么知道的

直接放代码。

在部署好的环境里面运行这份代码会给出相应的提示。
https://gist.github.com/mrry/ee5dbcfdd045fa48a27d56664411d41c

依据提示去看自己缺少什么。

附录原文

https://github.com/tensorflow/tensorflow/issues/7623

code

Let's see ... following is the info. After running tensorflow_self_check.py I see that it doesn't find a couple of cud*.dll needed for the GPU version of tensorflow. That's probably because I assumed I already had that installed as part of the NVIDIA software that comes with this PC. That's what I get for assuming!

NVIDIA GeForce GTX 960, 2GB

Intel Core i7-6700K @ 4.0GHz

C:\Users\jeffh>pip list | findstr tensorflow
tensorflow-gpu (1.2.1)

Run tensorflow_self_check.py script (note - syntax error line 111 of https://gist.github.com/mrry/ee5dbcfdd045fa48a27d56664411d41c ):

C:\Users\jeffh\Downloads>python tensorflow_self_check.py
ERROR: Failed to import the TensorFlow module.

  • Python version is 3.5.

  • TensorFlow is installed at: C:\Users\jeffh\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow

  • Could not load 'cudart64_80.dll'. The GPU version of TensorFlow
    requires that this DLL be installed in a directory that is named in
    your %PATH% environment variable. Download and install CUDA 8.0 from
    this URL: https://developer.nvidia.com/cuda-toolkit

  • Could not load 'cudnn64_5.dll'. The GPU version of TensorFlow
    requires that this DLL be installed in a directory that is named in
    your %PATH% environment variable. Note that installing cuDNN is a
    separate step from installing CUDA, and it is often found in a
    different directory from the CUDA DLLs. You may install the
    necessary DLL by downloading cuDNN 5.1 from this URL:
    https://developer.nvidia.com/cudnn
    Traceback (most recent call last):
    File "tensorflow_self_check.py", line 137, in
    main()
    File "tensorflow_self_check.py", line 108, in main
    if not cudnn5_found or not cudnn6_found:
    UnboundLocalError: local variable 'cudnn5_found' referenced before assignment

解决安装TensorFlow GPU缺少文件的一个比较终极的办法的更多相关文章

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

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

  2. Ubuntu在Anaconda中安装TensorFlow GPU,Keras,Pytorch

    安装TensorFlow GPU pip install --ignore-installed --upgrade tensorflow-gpu 安装测试: $ source activate tf ...

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

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

  4. Windows7 64bits下安装TensorFlow GPU版本(图文详解)

    不多说,直接上干货! Installing TensorFlow on Windows的官网 https://www.tensorflow.org/install/install_windows 首先 ...

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

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

  6. windows安装tensorflow GPU

    一.安装Anaconda Anaconda是Python发行包,包含了很多Python科学计算库.它是比直接安装Python更好的选择. 二.安装Tensorflow 如果安装了tensorflow, ...

  7. 【Tensorflow】Ubuntu 安装 Tensorflow gpu

    安装环境:Ubuntu 16.04lts 64位,gcc5.4 1.安装Cuda 1. 下载cuda toolkit. 下载cuda8.0 地址:https://developer.nvidia.co ...

  8. ubuntu安装 tensorflow GPU

    安装支持GPU的tensorflow前提是正确安装好了 CUDA 和 cuDNN. CUDA 和 cuDNN的安装见 Nvidia 官网和各种安装教程,应该很容易,重点是要选准了支持自己GPU的 CU ...

  9. 说说Windows7 64bits下安装TensorFlow GPU版本会遇到的一些坑

    不多说,直接上干货! 再写博文,回顾在Windows7上安装TensorFlow-GPU的一路坑 Windows7上安装TensorFlow的GPU版本后记 欢迎大家,加入我的微信公众号:大数据躺过的 ...

随机推荐

  1. CodeSmith Generator 7.0.2的激活流程

    学过三层的人应该认识CodeSmith Generator吧,今天我就跟大家一起探讨下CodeSmith Generator 7.0.2的激活,这最新版本破解的难度也是超越以往......具体看这篇日 ...

  2. 咸鱼入门到放弃8--jsp<三>jsp内置对象

    NO. 内置对象 类型 1 pageContext javax.servlet.jsp.PageContext 2 request javax.servlet.http.HttpServletRequ ...

  3. teamviewer连接未就绪的解决(Manjaro Linux)

    放假回家,想设置一下teamviewer,结果一直报错"TeamViewer not ready. Please check your connection" 查了一通,发现这个方 ...

  4. CSS属性兼容写法

    一种是用js判断兼容性 // JS if ("CSS" in window && "supports" in window.CSS) { var ...

  5. 【函数式编程】reducer为什么叫reducer

    最近学习前端的技术,在了解react对DOM的组件抽象,但不提供整体的组件通讯时候,了解了redux,然后就是react-redux: 抽象后,视图完全由对象决定,而用户只能接触视图,所以对象的改变必 ...

  6. LeetCode 70 - 爬楼梯 - [递推+滚动优化]

    假设你正在爬楼梯.需要 n 阶你才能到达楼顶. 每次你可以爬 1 或 2 个台阶.你有多少种不同的方法可以爬到楼顶呢? 注意:给定 n 是一个正整数. 示例 1: 输入: 2输出: 2解释: 有两种方 ...

  7. 使用docker搭建centos虚拟机

    网上有很多安装linux的,这里不记录; windows安装docker 转自:https://www.cnblogs.com/samwu/p/10360943.html(windows是家庭版的) ...

  8. 音视频下载Chrome插件 官方主页

    2019年3月20日前的旧版有不能下载的情况,请使用下面的新版 音视频下载是个点击图标后就能下载网页里正在播放的音视频文件的软件 下载:官方下载                百度网盘     Chr ...

  9. iOS代码组件化--利用cocoaPods创建私有库

    如果项目模块多,模块间逻辑复杂,我们发现多个人同时维护一个代码仓库需要十分小心,一不小心,造成冲突,解决起来很烦,相信很多人都遇到手工删除合并的冲突的文件的经历. 如果利用组件化思想,每个人维护自己的 ...

  10. [dev] Go语言查看doc与生成API doc

    类似与javadoc,go也可以自动生成doc文档. 方法有两个: 1. 使用go doc工具 可以查看它的详细文档: go help doc 示例: 在这个目录下,我创建一个api包 ╰─>$ ...