【问题标题】:No module named tensorflow.python.platform没有名为 tensorflow.python.platform 的模块
【发布时间】:2015-11-28 22:41:29
【问题描述】:

我正在运行tensorflow/g3doc/tutorials/mnist/fully_connected_feed.py。我明白了:

hiro106@hiro106-virtual-machine:~$ python tensorflow/tensorflow/g3doc/tutorials/mnist/fully_connected_feed.py
Traceback (most recent call last):
File "tensorflow/tensorflow/g3doc/tutorials/mnist/fully_connected_feed.py", line 33, in 
import tensorflow.python.platform
ImportError: No module named tensorflow.python.platform

【问题讨论】:

  • 非常感谢。但是,实际上,我之前检查过线程,但无法解决我的问题......(我认为我的问题与这个略有不同......)

标签: python tensorflow


【解决方案1】:

试试这个,它对我有用:

sudo pip install https://storage.googleapis.com/tensorflow/mac/tensorflow-0.5.0-py2-none-any.whl

【讨论】:

    【解决方案2】:

    import tensorflow 是否在 Python shell 中工作?

    如果没有,请尝试使用pip install --upgrade --force-reinstall <package> 重新安装。

    例如,对于支持 GPU 的 TensorFlow 1.12 版:pip install --upgrade --force-reinstall tensorflow-gpu==1.12.0

    【讨论】:

      【解决方案3】:

      这对我有帮助。

      PYTHONPATH="${PYTHONPATH}:/usr/local/lib/python2.7/dist-packages/"
      export PYTHONPATH
      
      Make sure to check your path with this: echo $PYTHONPATH
      

      【讨论】:

        猜你喜欢
        • 2019-11-03
        • 1970-01-01
        • 2020-06-15
        • 1970-01-01
        • 2019-03-28
        • 2017-12-30
        • 2018-01-06
        • 2018-11-11
        • 2015-04-10
        相关资源
        最近更新 更多