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 ...
随机推荐
- js笔记(4)--关于在window.onload()里面定义函数,调用函数无法执行~
由于本人学习js学不久,所以,今天刚好遇到了一个关于在window.onload里面定义函数,然后在html里面调用函数时出现错误.具体见下面: <!DOCTYPE html> <h ...
- 七、Application类
前言:每个运行的WPF应用程序都由System.Windows.Application类的一个实例来表示.程序集资源(assemblyre sources)的每个资源是一块可嵌入到编译过得应用程序中的 ...
- AI: 字体设计中的贝塞尔曲线
http://www.xueui.cn/tutorials/illustrator-tutorials/designers-must-know-the-secret-of-the-bezier-cur ...
- 你都这么拼了,面试官TM怎么还是无动于衷
面试,对于每个人而然并不陌生,可以说是必须经历的一个过程了,小到一场考试,大到企业面试,甚至大型选秀...... 有时自己明明很努力了,但偏偏会在面试环节出了插曲,比如,紧张就是最容易出现的了. 我相 ...
- Why Oracle VIP can not be switched to original node ?
Oracle RAC is an share everything database architecture. The article is how to check out why virtual ...
- DD boost你值得拥有
也不知道什么时候就被赶到这条路上来了,只听领导的一声令下,备份啊能不能在异地也存一份呀?? 啊?? 领导语重心长的说你看啊,我们这个备份是这个样子的 现在的南京的两个工厂备份要在对方留一份备份的存档, ...
- 2020牛客寒假算法基础集训营4 C : 子段乘积
C:子段乘积 考察点 : 线段树,尺取,乘法逆元 坑点 : 区间要做到不重不漏, long long 侃侃 : 这道题在比赛是写的尺取,但是写了半天发现不好处理除 0 问题(浮点错误),需要用到乘法逆 ...
- Vue使用v-for显示列表时,数组里的item数据更新,视图中列表不同步更新的解决方法
由于初始化类型错误导致的不更新,代码是这样的: <!DOCTYPE html> <html lang="en"> <head> <meta ...
- Quartz.NET - 课程 6: Cron 触发器
译者注: 目录在这 [译]Quartz.NET 3.x 教程 原文在这 Lesson 6: CronTrigger 如果你需要一个类似日历概念而不是像 SimpleTrigger 那样指定间隔来调度作 ...
- 用pycharm自带的数据库创建项目00
一.生成表格1.创建模型类(在 models.py文件中创建一个person类并且继承models.Models类) 2.生成表格(在项目目录下)(1)生成迁移文件:在pycharm下方的命令行Ter ...