【发布时间】:2020-04-01 13:33:03
【问题描述】:
我在 Windows 8 上安装了 Python 3.8 和 TensorFlow 1.12,但是,在编写此代码时(注意我没有使用 Anaconda):
import tensorflow as tf
我收到以下错误:
Traceback (most recent call last):
File "C:\Users\Dany\AppData\Local\Programs\Python\Python38-32\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
fp, pathname, description = imp.find_module('_pywrap_tensorflow_internal', [dirname(__file__)])
File "C:\Users\Dany\AppData\Local\Programs\Python\Python38-32\lib\imp.py", line 296, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pywrap_tensorflow_internal'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Dany\AppData\Local\Programs\Python\Python38-32\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\Dany\AppData\Local\Programs\Python\Python38-32\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\Dany\AppData\Local\Programs\Python\Python38-32\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
import _pywrap_tensorflow_internal
ModuleNotFoundError: No module named '_pywrap_tensorflow_internal'
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.
File "C:\Users\Dany\Desktop\FYP\Python files\NN.py", line 1, in <module>
import tensorflow as tf
【问题讨论】:
-
好像他们已经给了你一个链接来检查。你调查过吗?因为在调查时,他们已经链接了一个看起来像你的问题:stackoverflow.com/questions/42011070/…
-
我安装了python 3.5.3,现在又报错了:
-
我安装了python 3.5.3,现在又出现一个错误:ImportError: DLL load failed: The specified module could not be found。所以我尝试在这里查看stackoverflow.com/questions/42011070/… 并安装 lib MSVCP140.DLL 但它不起作用我认为它与我的版本不匹配
标签: python windows tensorflow visual-studio-code tensorflow2.0