ImportError: DLL load failed with error code -1073741795
Win7,python3.6,pip安装tensorflow之后报错:
>>> import tensorflow
Traceback (most recent call last):
File "D:\AppSetPlace\python36\lib\site-packages\tensorflow\python\pywrap_tenso
rflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "D:\AppSetPlace\python36\lib\site-packages\tensorflow\python\pywrap_tenso
rflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "D:\AppSetPlace\python36\lib\site-packages\tensorflow\python\pywrap_tenso
rflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, descript
ion)
File "D:\AppSetPlace\python36\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "D:\AppSetPlace\python36\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed with error code -1073741795 During handling of the above exception, another exception occurred: Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "D:\AppSetPlace\python36\lib\site-packages\tensorflow\__init__.py", line
28, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-im
port
File "D:\AppSetPlace\python36\lib\site-packages\tensorflow\python\__init__.py"
, line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "D:\AppSetPlace\python36\lib\site-packages\tensorflow\python\pywrap_tenso
rflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "D:\AppSetPlace\python36\lib\site-packages\tensorflow\python\pywrap_tenso
rflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "D:\AppSetPlace\python36\lib\site-packages\tensorflow\python\pywrap_tenso
rflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "D:\AppSetPlace\python36\lib\site-packages\tensorflow\python\pywrap_tenso
rflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, descript
ion)
File "D:\AppSetPlace\python36\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "D:\AppSetPlace\python36\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed with error code -1073741795
解决办法:
有人说(https://blog.csdn.net/fhqlongteng/article/details/80279197)是CPU太老了,我也不太懂CPU,但安装他说的办法:
问题的原因是我的电脑(联想V460)的cpu比较老,不支持AVX指令导致的,需要安装特殊编译的tensorflow 1.6.0版本才可以解决,注意安装时要先卸载先前安装的1.8.0版本。关于这个问题的详细解决过程可以参考github上面tensorflow的论坛。
问题解决了。
安装上面说的版本之后还可能出现一个错误:
from google.protobuf.pyext import _message,使用tensorflow出现 ImportError: DLL load failed
按照这篇博客(https://blog.csdn.net/u012193416/article/details/86301899)说的方法解决了问题:
在自动安装了tensorflow时, protobuf安装的是最新版本3.6.1, 出现了不兼容的问题。
更换为 protobuf 3.6.0即可(pip install protobuf==3.6.0)
ImportError: DLL load failed with error code -1073741795的更多相关文章
- python——报错ImportError:DLL load failed with error code -1073741795的解决方式
python中导入一个包,import cv2总是报错'ImportError:DLL load failed with error code -1073741795',报错形式: 网上找了好久的解决 ...
- 转载:Win7系统 利用 pycharm导入Tensorflow失败,出现报错——ImportError:DLL load failed with error code -1073741795的解决方式
转载自:https://blog.csdn.net/shen123me/article/details/80621103 下面的报错信息困扰了一天,网上的各种方法也都试过了,还是失败,最后自己瞎试,把 ...
- from _sqlite3 import * ImportError: DLL load failed: 找不到指定的模块。
*Error creating Django application: Error on python side. Exit code: 1, err: Traceback (most recent ...
- kivy sdl2 - ImportError: DLL load failed: 找不到指定的模块
from kivy.app import App from kivy.uix.button import Button class TestApp(App): def build(self): ret ...
- psycopg2 ImportError: DLL load failed
setup.py install 报错 error: command 'mt.exe' failed: No such file or directory 或者 Unable to find vc ...
- python中导入sklearn中模块提示ImportError: DLL load failed: 找不到指定的程序。
python版本:3.7 平台:windows 10 集成环境:Anaconda3.7 64位 在jupyter notebook中导入sklearn的相关模块提示ImportError: DLL l ...
- 关于在PyCharm中import numpy 出现from . import _mklinit ImportError: DLL load failed: 找不到指定模块
最近因为一些原因安装了Anaconda3并且重新配置Python环境,但是遇到了一些麻烦的事情. 首先就是在Anaconda已经装好numpy和mkl的情况下,在PyCharm中import nump ...
- Python报错 ImportError: DLL load failed while importing win32api: %1 不是有效的 Win32 应用程序 的解决方法
今天在用jupyter notebook 的时候发生了kernel error,点开之后提示了以下报错信息 Traceback (most recent call last): File " ...
- python ImportError: DLL load failed: %1 不是有效的 Win32 应用程序
导入的时候报出了 ImportError 在windows上安装python 的模块后,导入模块时报 python ImportError: DLL load failed: %1 不是有效的 Win ...
随机推荐
- A Simple Introduction To Computer Networking
Most networking discussions are a jumble of acronyms. Forget the configuration details - what are th ...
- Speech Super Resolution Generative Adversarial Network
博客作者:凌逆战 博客地址:https://www.cnblogs.com/LXP-Never/p/10874993.html 论文作者:Sefik Emre Eskimez , Kazuhito K ...
- VMware复制Linux虚拟机后网络配置
1.启动虚拟机,点击我已复制 点击已复制后,VMware将会为重置虚拟机网卡mac地址. 2.修改网卡mac地址 3.ifconfig显示网卡名称与配置不一致处理 Centos6中ifconfig显示 ...
- vue 入门 ------简单购物车功能实现(全选,数量加减,价格加减)
简易购物车功能(无任何布局 主要是功能) 数量的加减 商品的总价钱 全选与全不选 删除(全选.价格 受影响) <script src="https://cdn.jsdelivr.net ...
- qt creator源码全方面分析(2-3-2)
目录 Showing Task List Files in Issues Pane 管理任务列表条目 任务列表文件格式 Showing Task List Files in Issues Pane 您 ...
- linux下的cron定时任务知识梳理
1 cron定时任务 1.1 cron介绍 为什么需要cron定时任务? 1)cron服务在安装完Linux系统后就默认就存在,主要用来定期执行命令或定期执行指定的应用程序; 2)cron服务默认情况 ...
- DotNet源码学习-HASHSET(初探)
命名空间:System.Collections.Generic 先看一下官方说明:类提供了高级的设置操作.集是不包含重复元素的集合,其元素无特定顺序. HashSet <T>对象的容量是对 ...
- 分布式系统的CAP定理
CAP定理: 在一个分布式系统中,Consistency(数据一致性). Availability(服务可用性).Partition tolerance(分区容错性),三者不可兼得. 一致性(Cons ...
- vue循环语句
循环使用 v-for 指令. v-for 指令需要以 site in sites 形式的特殊语法, sites 是源数据数组并且 site 是数组元素迭代的别名. v-for 可以绑定数据到数组来渲染 ...
- SAP 如何看某个TR是否传入了Q或者P系统?
SAP 如何看某个TR是否传入了Q或者P系统? 两种方式可以查询. 1)进入Q系统或者P系统.SE16,看表TPALOG, 输入请求号码, 执行,看记录里的字段TPSTAT_KEY是否为空,如果不为空 ...