Tensorflow:ImportError: DLL load failed: 找不到指定的模块 Failed to load the native TensorFlow runtime

摘要:
文件“<disable=未使用的importFile”C:fromtensorflow.pythonimportpywrap _ tensorflowFile“C:fromtensorflow.python.pywrap _tensorflow_internalimport*文件”C:
  • 配置: Windows 10
  • python3.6
  • CUDA 10.1
  • CUDNN 7.6.0
  • tensorflow 1.12

过程:import tensorflow as tf ,然后报错:

Traceback (most recent call last):

  File "<ipython-input-6-64156d691fe5>", line 1, in <module>
    import tensorflow as tf

  File "C:UsersHonorVanAppDataRoamingPythonPython36site-packages	ensorflow\__init__.py", line 24, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import

  File "C:UsersHonorVanAppDataRoamingPythonPython36site-packages	ensorflowpython\__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow

  File "C:UsersHonorVanAppDataRoamingPythonPython36site-packages	ensorflowpythonpywrap_tensorflow.py", line 74, in <module>
    raise ImportError(msg)

ImportError: Traceback (most recent call last):
  File "C:UsersHonorVanAppDataRoamingPythonPython36site-packages	ensorflowpythonpywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "C:UsersHonorVanAppDataRoamingPythonPython36site-packages	ensorflowpythonpywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "C:UsersHonorVanAppDataRoamingPythonPython36site-packages	ensorflowpythonpywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "D:ProgramDataAnaconda3libimp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "D:ProgramDataAnaconda3libimp.py", line 343, 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.

期间尝试重新安装CUDA和CUDNN都没有效果,降级CUDA和CUDNN也是同样报错。

然后我就打算重新安装tensorflow,使用pip uninstall tensorflow-gpu==1.12.0卸载掉tensorflow-gpu,然后使用conda list查看发现竟然还有tensorflow-gpu存在,并且其他的依赖也没有少,这时重新import tensorflow,发现错误解决了。。。
Tensorflow:ImportError: DLL load failed: 找不到指定的模块 Failed to load the native TensorFlow runtime第1张

免责声明:文章转载自《Tensorflow:ImportError: DLL load failed: 找不到指定的模块 Failed to load the native TensorFlow runtime》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇STM32CubeIDE使用printf串口打印工作中遇到的问题--BindException下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

教你如何更改android应用的包名

Android 源码自带了很多应用程序,想改个包名方便修改?很简单,两步搞定,以packages/apps/Settings为例: 1、打开AndroidManifest.xml,把 <manifest xmlns:android="http://schemas.android.com/apk/res/android "         androi...

SQLite 参数化查询

SQLite参数化查询 首先给出两个参考博客: Sqlite DB sqlite3使用简介 贴出一段自己用的代码: #include <stdio.h> #include <stdlib.h> #include <sqlite3.h> int main(int argc, char* argv[]) { sql...

使用dom4j解析xml文件,并封装为javabean对象

See Also:http://blog.csdn.net/tao_sun/article/details/12452167 延伸: /** * 将xml内容封装到Vehicle对象中 * @param resultXML 内容为String格式的xml * @return */ @SuppressW...

springmvc总结(配置传递参数去除前后空格、参数绑定时处理日期)

1.属性为Integer时,前台表单不填,默认为null;属性为String,前台表单不填,默认为"";2.属性为Integer时,前台表单填空格,model封装为null;属性为String,前台表单填空格,model封装为"  ";3.属性为Integer,后台model封装时【去除】前后空格;属性为String,后台model封装时【不去除】前后空格...

安装mariadb

 安装mariadb有两个源,一个是阿里云的yum源,可能版本较低,软件包很小,功能很少 二个是mariadb官方的yum源,配置方式 在/etc/yum.repos.d目录下,建立一个repo文件就是yum仓库 #创建一个mariadb.repo文件,写入以下内容 [mariadb] name = MariaDB baseurl = http://yum...

基于WPF系统框架设计(6)-整合MVVM框架(Prism)

应用场景 我们基础的框架已经搭建起来了,现在整合MVVM框架Prism,在ViewModel做一些逻辑处理,真正把界面设计分离出来。 这样方便我们系统开发分工合作,同时提高系统可维护性和灵活性。 具体的Prism安装和Microsoft.Practices.Prism.dll获取,在这个网址:http://compositewpf.codeplex.com...