Skip to content

Ubuntu ImportError: No module named core.framework.graph_pb2 #51

Closed

Description

@liuyipei

I am unable to import tensorflow.
This problem appears whether I try to rebuild from source or by using the .whl directly.

(tensorflow)$ uname -a
Linux yi-2014 3.13.0-64-generic #104-Ubuntu SMP Wed Sep 9 12:36:12 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
(tensorflow)$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "tensorflow/__init__.py", line 4, in <module>
    from tensorflow.python import *
  File "tensorflow/python/__init__.py", line 13, in <module>
    from tensorflow.core.framework.graph_pb2 import *
ImportError: No module named core.framework.graph_pb2
>>> 

Activity

  1. ebrevdo commented on Nov 10, 2015

    @ebrevdo
    Contributor

    Are you running python inside the tensorflow source directory? If the directory 'tensorflow' is in your pwd, it may break imports. Try running python outside the source tree.

    If that's not it, please give some info about your system, version of python, etc.

  2. liuyipei commented on Nov 10, 2015

    @liuyipei
    ContributorAuthor

    Thank you. This solves it.

    I am still having other import issues, which I will open a new thread for.

  3. PeterBeukelman commented on Dec 20, 2015

    @PeterBeukelman

    from another directory, the error just changes to
    ImportError: cannot import name compat

  4. added a commit that references this issue on Feb 14, 2018
  5. added a commit that references this issue on Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions