[英]ImportError: No module named '_pywrap_tensorflow_internal' with Python 3.8
I installed Python 3.8 and TensorFlow 1.12 on Windows 8, however, when writing this code (noting that I am not using Anaconda):我在 Windows 8 上安装了 Python 3.8 和 TensorFlow 1.12,但是,在编写此代码时(注意我没有使用 Anaconda):
import tensorflow as tf
I' m getting the following error:我收到以下错误:
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
I installed Python 3.8 and TensorFlow 1.12 on Windows 8
我在 Windows 8 上安装了 Python 3.8 和 TensorFlow 1.12
This combination doesn't work.这种组合不起作用。 Python 3.8 was not supported when tensorflow (ie TF) was at version 1.12.
当 tensorflow(即 TF)为 1.12 版本时,不支持 Python 3.8。 It only support when
TF (2.2.0rc1,2.2.0rc2
).它仅在
TF (2.2.0rc1,2.2.0rc2
) 时支持。 Please check on pypi, there are no files available for cp38 for 1.12 .请检查 pypi,没有可用于 cp38 的文件1.12 。
If you are looking for compatible python versions for TF 1.12 are 3.5 to 3.7.如果您正在寻找 TF 1.12 的兼容 python 版本,则为 3.5 到 3.7。 If you are facing any issues with this installation there may be reason with compiler please install
MSVC 2015 update 3
.如果您在安装时遇到任何问题,可能是编译器有问题,请安装
MSVC 2015 update 3
。
Please refer TF tested build configuration details for CPU and GPU .请参阅CPU和GPU 的TF 测试构建配置详细信息。
If you don't have any concerns with TF version, I recommend you please install TF 2 which works on Windows 8 64-bit system.如果您对 TF 版本没有任何顾虑,我建议您安装 TF 2,它适用于 Windows 8 64 位系统。 Please refer more details here .
请在此处参考更多详细信息。
Note: After installation TF 2, if you are facing any DLL issues.注意:安装 TF 2 后,如果您遇到任何 DLL 问题。 Possible scenarios are
可能的情况是
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.