【发布时间】:2022-01-15 03:30:55
【问题描述】:
importError Traceback (most recent call last)
~\anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in <module>
63 try:
---> 64 from tensorflow.python._pywrap_tensorflow_internal import *
65 # This try catch logic is because there is no bazel equivalent for py_extension.
ImportError: DLL load failed while importing _pywrap_tensorflow_internal: The specified module could not be found.
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
<ipython-input-1-370f0fe8bb94> in <module>
----> 1 import tensorflow
~\anaconda3\lib\site-packages\tensorflow\__init__.py in <module>
39 import sys as _sys
40
---> 41 from tensorflow.python.tools import module_util as _module_util
42 from tensorflow.python.util.lazy_loader import LazyLoader as _LazyLoader
43
~\anaconda3\lib\site-packages\tensorflow\python\__init__.py in <module>
38 # pylint: disable=wildcard-import,g-bad-import-order,g-import-not-at-top
39
---> 40 from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow
41 from tensorflow.python.eager import context
42
~\anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in <module>
77 sys.setdlopenflags(_default_dlopen_flags)
78 except ImportError:
---> 79 raise ImportError(
80 f'{traceback.format_exc()}'
81 f'\n\nFailed to load the native TensorFlow runtime.\n'
ImportError: Traceback (most recent call last):
File "C:\Users\user\anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in <module>
from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed while importing _pywrap_tensorflow_internal: The specified module could not be found.
【问题讨论】:
-
请提供足够的代码,以便其他人更好地理解或重现问题。
标签: python python-3.x tensorflow