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 ...
随机推荐
- 使用alpine制作最小化的JDK基础镜像
注意:这里使用的是oracle的JRE,版本是1.8. 1.解压jre包,删除根目录下文本文件,然后删除其他不必要文件. #解压 tar xvcf jre-8u161-linux-x64.tar.gz ...
- 在Navicat新建用户
1.Ctrl+Q,进入查询,创建表空间. 输入create tablespace test datafile 'D:\Oracle\test.ora' size 1000m; 这里的test为表空间名 ...
- 说说GAN(生成式对抗网络)
在Auto-encoder中,input data通过一个encoder神经网络得到一个维度的较低的向量,称这个向量为code,code经过一个decoder神经网络后输出一个output data. ...
- 题解【Luogu6022 快乐水】
\[ Preface \] 大概在半年前出过这道((( 然后当天读完这题,把自己写的 std 改了一下 ll 和特判信息交上去就 A 了. 捡了个大便宜. \[ Description \] 你一开始 ...
- 题解 NOI2004【郁闷的出纳员】
\[ Preface \] 之前用 treap 打,交了四遍才过. 自学了 fhq treap 后,才意识到是一道 fhq treap 板子题,直接码上,一遍就过. 本题解提供的是 fhq treap ...
- 康拓展开 & 逆康拓展开 知识总结(树状数组优化)
康拓展开 : 康拓展开,难道他是要飞翔吗?哈哈,当然不是了,康拓具体是哪位大叔,我也不清楚,重要的是 我们需要用到它后面的展开,提到展开,与数学相关的,肯定是一个式子或者一个数进行分解,即 展开. 到 ...
- C++中STL库函数的基本运用
学了这么长时间的STL库,现在我觉得是有必要对过去的题目和所遇到的问题做一下整理了,以便于之后更好的展开练习: 一. 为什么要用STL库? 1.简单粗暴(省事). 2.便于解决复杂的问题(在贪心题目中 ...
- Linux 工作机初始化操作
# apt 依赖包安装 sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libs ...
- 多版本python创建虚拟环境
不表示默认的python使用 mkvirtualenv -p c:\python27\python.exe test1,即 mkvirtualenv -p 要安装的版本的python.exe路径 ...
- centos7上安装docker社区版
container(容器) docker(集装箱) 容器的优点 1. 启动速度快 2. 节省资源 3. 兼容性高 保证机器正常上网 #ping www.baidu.com CPU需要支持虚拟化 # g ...