ImportError: DLL load failed while importing _pywrap_tensorflow_internal

运行tensorflow模型时遇到下面问题(待解决

Using TensorFlow backend.
Traceback (most recent call last):
File "d:\ProgramData\Anaconda3\envs\myenv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "d:\ProgramData\Anaconda3\envs\myenv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "d:\ProgramData\Anaconda3\envs\myenv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "d:\ProgramData\Anaconda3\envs\myenv\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "d:\ProgramData\Anaconda3\envs\myenv\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed while importing _pywrap_tensorflow_internal: 动态链接库(DLL)初始化例程失败。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "tensorflow_infer.py", line 8, in <module>
from keras.models import model_from_json
File "d:\ProgramData\Anaconda3\envs\myenv\lib\site-packages\keras\__init__.py", line 3, in <module>
from . import utils
File "d:\ProgramData\Anaconda3\envs\myenv\lib\site-packages\keras\utils\__init__.py", line 6, in <module>
from . import conv_utils
File "d:\ProgramData\Anaconda3\envs\myenv\lib\site-packages\keras\utils\conv_utils.py", line 9, in <module>
from .. import backend as K
File "d:\ProgramData\Anaconda3\envs\myenv\lib\site-packages\keras\backend\__init__.py", line 1, in <module>
from .load_backend import epsilon
File "d:\ProgramData\Anaconda3\envs\myenv\lib\site-packages\keras\backend\load_backend.py", line 90, in <module>
from .tensorflow_backend import *
File "d:\ProgramData\Anaconda3\envs\myenv\lib\site-packages\keras\backend\tensorflow_backend.py", line 5, in <module>
import tensorflow as tf
File "d:\ProgramData\Anaconda3\envs\myenv\lib\site-packages\tensorflow\__init__.py", line 41, in <module>
from tensorflow.python.tools import module_util as _module_util
File "d:\ProgramData\Anaconda3\envs\myenv\lib\site-packages\tensorflow\python\__init__.py", line 50, in <module>
from tensorflow.python import pywrap_tensorflow
File "d:\ProgramData\Anaconda3\envs\myenv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 69, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "d:\ProgramData\Anaconda3\envs\myenv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "d:\ProgramData\Anaconda3\envs\myenv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "d:\ProgramData\Anaconda3\envs\myenv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "d:\ProgramData\Anaconda3\envs\myenv\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "d:\ProgramData\Anaconda3\envs\myenv\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed while importing _pywrap_tensorflow_internal: 动态链接库(DLL)初始化例程失败。


Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors

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

posted @ 2020-09-04 15:45  Mr_zho  阅读(4173)  评论(1编辑  收藏  举报