Windows下安装完tensorflow后,在cmd下运行python后import tensorflow出现如下错误:

  Traceback (most recent call last): 
  File “D:\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 18, in swig_import_helper 
  return importlib.import_module(mname) 
  File “D:\Python\Python35\lib\importlib__init__.py”, line 126, in import_module 
  return _bootstrap._gcd_import(name[level:], package, level) 
  File “frozen importlib._bootstrap”, line 986, in _gcd_import 
  File “frozen importlib._bootstrap”, line 969, in _find_and_load 
  File “frozen importlib._bootstrap”, line 958, in _find_and_load_unlocked 
  File “frozen importlib._bootstrap”, line 666, in _load_unlocked 
  File “frozen importlib._bootstrap”, line 577, in module_from_spec 
  File “frozen importlib._bootstrap_external”, line 906, in create_module 
  File “frozen importlib._bootstrap”, line 222, in _call_with_frames_removed 
  ImportError: DLL load failed: 找不到指定的模块。

  (省略一些)。。。。。。

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last): 
  File “D:\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 41, in module 
  from tensorflow.python.pywrap_tensorflow_internal import * 
  File “D:\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 21, in module 
  _pywrap_tensorflow_internal = swig_import_helper() 
  File “D:\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 20, in swig_import_helper   
  
return importlib.import_module(‘_pywrap_tensorflow_internal’) 
  
File “D:\Python\Python35\lib\importlib__init__.py”, line 126, in import_module 
  
return _bootstrap._gcd_import(name[level:], package, level) 
  
ImportError: No module named ‘_pywrap_tensorflow_internal’

  
Failed to load the native TensorFlow runtime.

  See https://www.tensorflow.org/install/install_sources#common_installation_problems

  for some common reasons and solutions. Include the entire stack trace  above this error message when asking for help.

  博主在查找问题解决方案的时候,有说需要安装Anaconda,我是直接安装的python3.5.3版本,没有使用anaconda。又有的说需要安装visual studio 2017,事实上只是vs2017刚好有运行tensorflow的环境,所以我们需要做的只是安装缺少的环境即可。在下面的链接中下载对应版本(23位和64位),进行安装就可以。

  https://www.microsoft.com/en-us/download/details.aspx?id=53587

  继续在cmd下执行python,import tensorflow as tf,不报错即说明安装成功啦。

  附上非官方windows下python extension packages的whl包链接:http://www.lfd.uci.edu/~gohlke/pythonlibs/

  

版权声明:

作者:王老头
出处:http://www.cnblogs.com/wmr95/p/7677791.html
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,并在文章页面明显位置给出原文链接,否则,作者将保留追究法律责任的权利。

Windows下安装Tensorflow报错 “DLL load failed:找不到指定的模块"的更多相关文章

  1. win10执行Tensorflow,总是会报错“DLL load failed: 找不到指定的模块”的解决方式----终极版方式

    win10上运行tensorflow时报错,“DLL load failed: 找不到指定的模块”的解决方式 我只想说,当你们遇到这个问题的时候,以下终极版的方式出来了,非常感谢知乎 leo lv ! ...

  2. 导入tensorflow.出现importError: DLL load failed: 找不到指定的模块。

    导入tensorflow.出现importError: DLL load failed: 找不到指定的模块. 原因 这是由于windows上没有相应的动态链接库导致的,tensorflow依赖很多c+ ...

  3. windows下安装pywin32报错:close failed in file object destructor:sys.excepthook is missing lost sys.stderr

    今晚要写搜索引擎作业,搭scrapy环境,遇到了下面问题: windows下安装pywin32报错:close failed in file object destructor:sys.excepth ...

  4. ImportError: DLL load failed: 找不到指定的模块;ImportError: numpy.core.multiarray failed to import 报错解决

    python程序运行出错,出错的两行主要信息如下: ImportError: DLL load failed: 找不到指定的模块 ImportError: numpy.core.multiarray ...

  5. win10 anaconda安装后使用报错“Original error was: DLL load failed: 找不到指定的模块”

    报错:Original error was: DLL load failed: 找不到指定的模块. 环境变量需要添加3个 然后就okay了.

  6. win7 32位 安装opencv-python后,运行时提示 "from .cv2 import *: DLL load failed: 找不到指定的模块" 的解决办法

    安装opencv后,运行一个测试程序提示"from .cv2 import *: DLL load failed: 找不到指定的模块".于是百度一下解决办法,结果试了N多方法后也没 ...

  7. jupyter|浏览器启动问题|“ImportError: DLL load failed: 找不到指定的模块”sqlite3

    问题: 1.安装好Anconda3后,开始——>打开jupyter notebook时 默认浏览器无法启动 2.开始打开——>anaconda prompt 输入jupyter noteb ...

  8. kivy sdl2 - ImportError: DLL load failed: 找不到指定的模块。

    kivy version : windows:win python version:3.6 sdl2 - ImportError: DLL load failed: 找不到指定的模块. 运行以下dem ...

  9. 终于解决了python 3.x import cv2 “ImportError: DLL load failed: 找不到指定的模块” 及“pycharm关于cv2没有代码提示”的问题

    终于解决了python 3.x import cv2 “ImportError: DLL load failed: 找不到指定的模块” 及“pycharm关于cv2没有代码提示”的问题   参考 :h ...

随机推荐

  1. 20171114xlVba选定单行记录并打印

    Public Sub PrintSelectRow() Dim Wb As Workbook Dim iSht As Worksheet Dim rSht As Worksheet Dim pSht ...

  2. android -------- Eclipse下的NDK配置环境

    NDK 全称是Native Development Kit,是一个让开发人员在Android应用中嵌入使用本地代码编写的组件的工具集 原生开发工具包 (NDK) 是一组可让您在 Android 应用中 ...

  3. ddt 实例

    from :https://blog.csdn.net/wushuai150831/article/details/78453549

  4. 160. Intersection of Two Linked Lists(剑指Offer-两个链表的第一个公共结点)

    题目: Write a program to find the node at which the intersection of two singly linked lists begins. Fo ...

  5. Spring AOP实现Mysql数据库主从切换(一主多从)

    设置数据库主从切换的原因:数据库中经常发生的是“读多写少”,这样读操作对数据库压力比较大,通过采用数据库集群方案, 一个数据库是主库,负责写:其他为从库,负责读,从而实现读写分离增大数据库的容错率.  ...

  6. IntelliJ IDEA调试方法补充

    基本用法&快捷键 1.首先说第一组按钮,共8个按钮,从左到右依次如下: > Show Execution Point (Alt + F10):如果你的光标在其它行或其它页面,点击这个按钮 ...

  7. 『计算机视觉』Mask-RCNN_推断网络其一:总览

    在我们学习的这个项目中,模型主要分为两种状态,即进行推断用的inference模式和进行训练用的training模式.所谓推断模式就是已经训练好的的模型,我们传入一张图片,网络将其分析结果计算出来的模 ...

  8. 发送http请求,get和post两种请求方式

    GET请求 GetMethod getMethod=null; String datas = "json=" + plain; HttpClient httpClient = ne ...

  9. kohana导入和导出

    一.导入 ini_set('memory_limit', '512M'); require_once(Kohana::find_file('vendor', 'PHPExcel/PHPExcel/IO ...

  10. Java异常及错误

    java提供了两种异常机制,可以分为运行时异常(RuntimeException)与检查式异常(checked Exception). 检查式异常:java编译器对于这种异常需要我们对其用try... ...