请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

ImportError: DLL load failed: 动态链接库(DLL)初始化例程失败

图片描述依赖包都安装了,tensorflow一直报错

Using TensorFlow backend.
Traceback (most recent call last):
File “D:\Envs\article_spider\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File “D:\JetBrains\PyCharm 2018.3.2\helpers\pydev_pydev_bundle\pydev_import_hook.py”, line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File “D:\Envs\article_spider\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 35, in
_pywrap_tensorflow_internal = swig_import_helper()
File “D:\Envs\article_spider\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 30, in swig_import_helper
_mod = imp.load_module(’_pywrap_tensorflow_internal’, fp, pathname, description)
File “D:\Envs\article_spider\lib\imp.py”, line 242, in load_module
return load_dynamic(name, filename, file)
File “D:\Envs\article_spider\lib\imp.py”, line 342, in load_dynamic
return load(spec)
ImportError: DLL load failed: 动态链接库(DLL)初始化例程失败。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “”, line 1, in
File “D:\JetBrains\PyCharm 2018.3.2\helpers\pydev_pydev_bundle\pydev_umd.py”, line 197, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File “D:\JetBrains\PyCharm 2018.3.2\helpers\pydev_pydev_imps_pydev_execfile.py”, line 18, in execfile
exec(compile(contents+"\n", file, ‘exec’), glob, loc)
File “D:/PycharmProjects/ArticleSpider/tools/zheye_test.py”, line 2, in
z = zheye()
File "D:\PycharmProjects\ArticleSpider\zheye_init
.py", line 14, in init
import keras
File “D:\JetBrains\PyCharm 2018.3.2\helpers\pydev_pydev_bundle\pydev_import_hook.py”, line 21, in do_import
module = self.system_import(name, *args, **kwargs)
File "D:\Envs\article_spider\lib\site-packages\keras_init
.py", line 3, in
from . import utils
File “D:\JetBrains\PyCharm 2018.3.2\helpers\pydev_pydev_bundle\pydev_import_hook.py”, line 21, in do_import
module = self.system_import(name, *args, **kwargs)
File "D:\Envs\article_spider\lib\site-packages\keras\utils_init
.py", line 6, in
from . import conv_utils
File “D:\JetBrains\PyCharm 2018.3.2\helpers\pydev_pydev_bundle\pydev_import_hook.py”, line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File “D:\Envs\article_spider\lib\site-packages\keras\utils\conv_utils.py”, line 9, in
from … import backend as K
File “D:\JetBrains\PyCharm 2018.3.2\helpers\pydev_pydev_bundle\pydev_import_hook.py”, line 21, in do_import
module = self.system_import(name, *args, **kwargs)
File "D:\Envs\article_spider\lib\site-packages\keras\backend_init
.py", line 89, in
from .tensorflow_backend import *
File “D:\JetBrains\PyCharm 2018.3.2\helpers\pydev_pydev_bundle\pydev_import_hook.py”, line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File “D:\Envs\article_spider\lib\site-packages\keras\backend\tensorflow_backend.py”, line 5, in
import tensorflow as tf
File “D:\JetBrains\PyCharm 2018.3.2\helpers\pydev_pydev_bundle\pydev_import_hook.py”, line 21, in do_import
module = self.system_import(name, *args, **kwargs)
File "D:\Envs\article_spider\lib\site-packages\tensorflow_init
.py", line 22, in
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File “D:\JetBrains\PyCharm 2018.3.2\helpers\pydev_pydev_bundle\pydev_import_hook.py”, line 21, in do_import
module = self.system_import(name, *args, **kwargs)
File "D:\Envs\article_spider\lib\site-packages\tensorflow\python_init
.py", line 49, in
from tensorflow.python import pywrap_tensorflow
File “D:\JetBrains\PyCharm 2018.3.2\helpers\pydev_pydev_bundle\pydev_import_hook.py”, line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File “D:\Envs\article_spider\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 74, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File “D:\Envs\article_spider\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File “D:\JetBrains\PyCharm 2018.3.2\helpers\pydev_pydev_bundle\pydev_import_hook.py”, line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File “D:\Envs\article_spider\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 35, in
_pywrap_tensorflow_internal = swig_import_helper()
File “D:\Envs\article_spider\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 30, in swig_import_helper
_mod = imp.load_module(’_pywrap_tensorflow_internal’, fp, pathname, description)
File “D:\Envs\article_spider\lib\imp.py”, line 242, in load_module
return load_dynamic(name, filename, file)
File “D:\Envs\article_spider\lib\imp.py”, line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed: 动态链接库(DLL)初始化例程失败。
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.

正在回答 回答被采纳积分+3

1回答

bobby 2019-03-18 16:48:05

https://www.imooc.com/article/40620 你看看这个问题

0 回复 有任何疑惑可以回复我~
  • 提问者 NightWhite_vie #1
    老师,我用的是Python 3.7,会是因为3.7的原因吗
    回复 有任何疑惑可以回复我~ 2019-03-18 19:05:10
  • 提问者 NightWhite_vie #2
    老师我专门下了Anaconda,并创建一个python3.5的虚拟环境,tensorflow按照文章中安装1.3版本,终于能正常运行zheye的测试程序了
    回复 有任何疑惑可以回复我~ 2019-03-18 21:22:12
  • bobby 回复 提问者 NightWhite_vie #3
    好的,
    回复 有任何疑惑可以回复我~ 2019-03-19 18:35:55
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号