导入 TensorFlow 时没有名为 "tensorflow.python.platform" 的模块 ||Tflearn on Python Shell



我在Windows 10 PC上运行python 3.7我在 Python 项目中导入 TensorFlow 或 TFlearn 时遇到问题每次跑步后

import tflearn 
import tensorflow

我总是最终得到同样的错误

    import tflearn
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:Program FilesPython37libsite-packagestflearn__init__.py", line 4, in <module>
    from . import config
  File "C:Program FilesPython37libsite-packagestflearnconfig.py", line 3, in <module>
    import tensorflow as tf
  File "C:UsersgenesAppDataRoamingPythonPython37site-packagestensorflow__init__.py", line 24, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "C:UsersgenesAppDataRoamingPythonPython37site-packagestensorflowpython__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "C:UsersgenesAppDataRoamingPythonPython37site-packagestensorflowpythonpywrap_tensorflow.py", line 25, in <module>
    from tensorflow.python.platform import self_check
ModuleNotFoundError: No module named 'tensorflow.python.platform'

关于如何为TFlearn和TensorFlow导入解决这个问题的任何想法。

你可以试试这个:点子安装 TF学习

在此之后,请尝试再次导入 tflearn

最新更新