Faceswap:无法加载本机TensorFlow运行时

时间:2018-06-26 12:10:49

标签: python python-3.x tensorflow

Traceback (most recent call last):
  File "C:\Users\divya\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "C:\Users\divya\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "C:\Users\divya\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 17, in swig_import_helper
    return importlib.import_module(mname)
  File "C:\ProgramData\Anaconda3\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.

在处理上述异常期间,发生了另一个异常:

Traceback (most recent call last):
  File "faceswap.py", line 33, in <module>
    ARGUMENTS.func(ARGUMENTS)
  File "D:\Projects\faceswap\lib\cli.py", line 36, in execute_script
    script = self.import_script()
  File "D:\Projects\faceswap\lib\cli.py", line 25, in import_script
    from scripts.train import Train as script
  File "D:\Projects\faceswap\scripts\train.py", line 9, in <module>
    import tensorflow as tf
  File "C:\Users\divya\AppData\Roaming\Python\Python36\site-packages\tensorflow\__init__.py", line 24, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "C:\Users\divya\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "C:\Users\divya\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "C:\Users\divya\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "C:\Users\divya\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "C:\Users\divya\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 17, in swig_import_helper
    return importlib.import_module(mname)
  File "C:\ProgramData\Anaconda3\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.

无法加载本机TensorFlow运行时。 link here

1 个答案:

答案 0 :(得分:0)

该错误是因为您可能使用的是 32 位操作系统或 32 位 Python。还要检查您的 CPU 是否支持 AVX 指令集。 确保正确安装了 Tensorflow 上给出的所有依赖项。