【发布时间】:2019-09-05 19:41:03
【问题描述】:
我正在尝试运行 Tensorflow 的简单语音识别网络示例:
python tensorflow/examples/speech_commands/train.py
但我不断得到:
Traceback(最近一次调用最后一次): 文件“C:\Users\DELL 7000\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”,第 18 行,在 swig_import_helper fp,路径名,描述 = imp.find_module('_pywrap_tensorflow', [dirname(file)]) 文件“C:\Users\DELL 7000\AppData\Local\Programs\Python\Python37-32\lib\imp.py”,第 296 行,在 find_module 引发 ImportError(_ERR_MSG.format(name), name=name) ImportError:没有名为“_pywrap_tensorflow”的模块
在处理上述异常的过程中,又发生了一个异常:
Traceback(最近一次调用最后一次): 文件“C:\Users\DELL 7000\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow\python__init__.py”,第 66 行,在 从 tensorflow.python 导入 pywrap_tensorflow 文件“C:\Users\DELL 7000\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”,第 28 行,在 _pywrap_tensorflow = swig_import_helper() 文件“C:\Users\DELL 7000\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”,第 20 行,在 swig_import_helper 导入 _pywrap_tensorflow ModuleNotFoundError:没有名为“_pywrap_tensorflow”的模块
在处理上述异常的过程中,又发生了一个异常:
Traceback(最近一次调用最后一次): 文件“tensorflow/examples/speech_commands/train.py”,第 79 行,在 将张量流导入为 tf 文件“C:\Users\DELL 7000\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow__init__.py”,第 24 行,在 从 tensorflow.python 导入 * 文件“C:\Users\DELL 7000\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow\python__init__.py”,第 72 行,在 引发 ImportError(味精) ImportError: Traceback (最近一次调用最后一次): 文件“C:\Users\DELL 7000\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”,第 18 行,在 swig_import_helper fp,路径名,描述 = imp.find_module('_pywrap_tensorflow', [dirname(file)]) 文件“C:\Users\DELL 7000\AppData\Local\Programs\Python\Python37-32\lib\imp.py”,第 296 行,在 find_module 引发 ImportError(_ERR_MSG.format(name), name=name) ImportError:没有名为“_pywrap_tensorflow”的模块
在处理上述异常的过程中,又发生了一个异常:
Traceback(最近一次调用最后一次): 文件“C:\Users\DELL 7000\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow\python__init__.py”,第 66 行,在 从 tensorflow.python 导入 pywrap_tensorflow 文件“C:\Users\DELL 7000\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”,第 28 行,在 _pywrap_tensorflow = swig_import_helper() 文件“C:\Users\DELL 7000\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”,第 20 行,在 swig_import_helper 导入 _pywrap_tensorflow ModuleNotFoundError:没有名为“_pywrap_tensorflow”的模块
无法加载原生 TensorFlow 运行时。
出于一些常见原因和解决方案。包括整个堆栈跟踪 寻求帮助时出现此错误消息。
我发现的大多数解决方案都告诉我重新安装 Visual c++ 或手动将 MSVCP140.dll 添加到路径中。但是这些都不能解决我的问题。
它告诉我参考的 github 页面返回 404。
我使用的是 python 3.7.2 和 tensorflow 1.0.0。
【问题讨论】:
标签: python python-3.x tensorflow speech-recognition