TensorFlow DLL加载失败:找不到指定的模块

2024-09-26 22:44:56 发布

您现在位置:Python中文网/ 问答频道 /正文

正在尝试在终端中运行python,已完成:

 (base) C:\Users\Yinqi\trRosetta2\trRosetta>conda create -n tf tensorflow

但是遇到了这个错误:

ImportError: DLL load failed: The specified module could not be found. Failed to load the native TensorFlow runtime.

完全回溯:

File "C:\Users\Yinqi\anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in <module>
    from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "predict.py", line 6, in <module>
    import tensorflow as tf
  File "C:\Users\Yinqi\anaconda3\lib\site-packages\tensorflow\__init__.py", line 41, in <module>
    from tensorflow.python.tools import module_util as _module_util
  File "C:\Users\Yinqi\anaconda3\lib\site-packages\tensorflow\python\__init__.py", line 40, in <module>
    from tensorflow.python.eager import context
  File "C:\Users\Yinqi\anaconda3\lib\site-packages\tensorflow\python\eager\context.py", line 35, in <module>
    from tensorflow.python import pywrap_tfe
  File "C:\Users\Yinqi\anaconda3\lib\site-packages\tensorflow\python\pywrap_tfe.py", line 28, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "C:\Users\Yinqi\anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 83, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "C:\Users\Yinqi\anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in <module>
    from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed: The specified module could not be found.

Python版本3.7.7,windows版本20h2

我在看这个,但不确定如何修复:https://github.com/tensorflow/tensorflow/issues/38916

编辑: 运行tensorflow似乎需要支持AVX的cpu,而我没有


Tags: infrompyimportlibpackagestensorflowline

热门问题