解决安装TensorFlow GPU缺少文件的一个比较终极的办法
可能的报错信息
TensorFlow 下,导入这份配置的时候 python 停止运行
ImportError: DLL load failed: 找不到指定的模块 或 ImportError: No module named ‘_pywrap_tensorflow’ 或 Failed to load the native TensorFlow runtime.
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-toolkitCould 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缺少文件的一个比较终极的办法的更多相关文章
- 通过Anaconda在Ubuntu16.04上安装 TensorFlow(GPU版本)
一. 安装环境 Ubuntu16.04.3 LST GPU: GeForce GTX1070 Python: 3.5 CUDA Toolkit 8.0 GA1 (Sept 2016) cuDNN v6 ...
- Ubuntu在Anaconda中安装TensorFlow GPU,Keras,Pytorch
安装TensorFlow GPU pip install --ignore-installed --upgrade tensorflow-gpu 安装测试: $ source activate tf ...
- ubuntu16.04下安装TensorFlow(GPU加速)----详细图文教程【转】
本文转载自:https://blog.csdn.net/zhaoyu106/article/details/52793183 le/details/52793183 写在前面 一些废话 接触深度学习已 ...
- Windows7 64bits下安装TensorFlow GPU版本(图文详解)
不多说,直接上干货! Installing TensorFlow on Windows的官网 https://www.tensorflow.org/install/install_windows 首先 ...
- win10系统下安装TensorFlow GPU版本
首先要说,官网上的指南是最好的指南. https://www.tensorflow.org/install/install_windows 需要FQ看. 想要安装gpu版本的TensorFlow.我们 ...
- windows安装tensorflow GPU
一.安装Anaconda Anaconda是Python发行包,包含了很多Python科学计算库.它是比直接安装Python更好的选择. 二.安装Tensorflow 如果安装了tensorflow, ...
- 【Tensorflow】Ubuntu 安装 Tensorflow gpu
安装环境:Ubuntu 16.04lts 64位,gcc5.4 1.安装Cuda 1. 下载cuda toolkit. 下载cuda8.0 地址:https://developer.nvidia.co ...
- ubuntu安装 tensorflow GPU
安装支持GPU的tensorflow前提是正确安装好了 CUDA 和 cuDNN. CUDA 和 cuDNN的安装见 Nvidia 官网和各种安装教程,应该很容易,重点是要选准了支持自己GPU的 CU ...
- 说说Windows7 64bits下安装TensorFlow GPU版本会遇到的一些坑
不多说,直接上干货! 再写博文,回顾在Windows7上安装TensorFlow-GPU的一路坑 Windows7上安装TensorFlow的GPU版本后记 欢迎大家,加入我的微信公众号:大数据躺过的 ...
随机推荐
- ThinkPHP5配置redis缓存
thinkphp采用cache类提供缓存功能支持,采用驱动方式,在使用缓存之前需要进行初始化操作.支持的缓存类型包括file.memcache.wincache.sqlite.redis和xcache ...
- ReactiveCocoa - study
//KVO值监控,当alertTip改变时调用, filter对alertTip值进行过滤,此处当alertTip存在而长度不为0时,执行suscribeNext方法,弹出提示 [[RACObserv ...
- python可视化pyecharts
python可视化pyecharts 简单介绍 pyecharts 是一个用于生成 Echarts 图表的类库.Echarts 是百度开源的一个数据可视化 JS 库.用 Echarts 生成的图可视化 ...
- js事件循环机制 (Event Loop)
一.JavaScript是单线程单并发语言 什么是单线程 主程序只有一个线程,即同一时间片断内其只能执行单个任务. 为什么选择单线程? JavaScript的主要用途是与用户互动,以及操作DOM.这决 ...
- 解读vscode断点调试配置文件【待续】
一.参考链接 https://code.visualstudio.com/Docs/editor/debugging https://code.visualstudio.com/docs/nodejs ...
- 最优装载—dp
最优装载—dp 动态规划 一 问题描述 二 问题分析 三 代码实现 package dp_Loading; import java.io.BufferedWriter; import java.io. ...
- 错误解决记录-------------验证启动HDFS时遇到的错误
主要解决验证启动HDFS时: 1) jps:bash: jps: command not found... 原因:主要是java/bin 环境变量没配置好. 解决办法: 在 ~/.bash_prof ...
- 05-BootStrap
今日任务 使用JQuery发送请求局部刷新页面 使用BootStrap制作一个响应式的页面 使用BootStrap制作网站的首页 教学目标 掌握什么是响应式及响应式的原理 掌握BootStrap的栅格 ...
- NOIP-数字反转
题目描述 给定一个整数,请将该数各个位上数字反转得到一个新数.新数也应满足整数的常见形式,即除非给定的原数为零,否则反转后得到的新数的最高位数字不应为零(参见样例2). 输入描述: 一个整数 N. 输 ...
- MongoDB 组合多个条件查询($and、$in、$gte、$lte)
一,问题描述 数据格式: id, timeStamp,count 条件1:查询 某个时间段 内的数据: timeStamp BETWEEN startTime AND endTime.比如 timeS ...