ImportError:导入_pywrap_tensorflow_internal时DLL加载失败:动态链接库(DLL)初始化例程失败

时间:2020-09-06 17:39:48

标签: python tensorflow

我在Windows 10上通过venv安装了TensorFlow,并按照https://www.tensorflow.org/install/pip

上的所有步骤进行操作

在验证安装时,我使用了python -c "import tensorflow as tf;print(tf.reduce_sum(tf.random.normal([1000, 1000]))) 输出显示:

Traceback (most recent call last):
  File "C:\Users\Nechaev\.venv\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: A dynamic link library (DLL) initialization routine failed.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\Nechaev\.venv\lib\site-packages\tensorflow\__init__.py", line 41, in <module>
    from tensorflow.python.tools import module_util as _module_util
  File "C:\Users\Nechaev\.venv\lib\site-packages\tensorflow\python\__init__.py", line 40, in <module>
    from tensorflow.python.eager import context
  File "C:\Users\Nechaev\.venv\lib\site-packages\tensorflow\python\eager\context.py", line 35, in <module>
    from tensorflow.python import pywrap_tfe
  File "C:\Users\Nechaev\.venv\lib\site-packages\tensorflow\python\pywrap_tfe.py", line 28, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "C:\Users\Nechaev\.venv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 83, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "C:\Users\Nechaev\.venv\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: A dynamic link library (DLL) initialization routine failed.


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.

我浏览了https://www.tensorflow.org/install/errors,但找不到任何有帮助的东西。

0 个答案:

没有答案