Skip to content

Installed from source; unable to import tensorflow #81

Description

@arimwilson

ariw@clairvoyance:~/tensorflow$ python
Python 2.7.6 (default, Jun 22 2015, 18:00:18)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import tensorflow
Traceback (most recent call last):
File "", line 1, in
File "tensorflow/init.py", line 4, in
from tensorflow.python import *
File "tensorflow/python/init.py", line 13, in
from tensorflow.core.framework.graph_pb2 import *
ImportError: No module named core.framework.graph_pb2
exit()

Activity

  1. graphific commented on Nov 10, 2015

    @graphific

    did you pip install the python wheel as well?

  2. felixduvallet commented on Nov 10, 2015

    @felixduvallet

    I have the same issue, installed tensorflow using pip:
    sudo pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl

    Running python 2.7.6 on Linux Mint 17.1 (so basically Ubuntu 14.04).

  3. felixduvallet commented on Nov 10, 2015

    @felixduvallet

    I resolved my issue by uninstalling another version of protobuf that was previously installed with pip:
    sudo pip uninstall protobuf
    then installing the python wheel again.

  4. ebrevdo commented on Nov 10, 2015

    @ebrevdo
    Contributor

    This error often happens if you open a python shell in the base bazel directory. The directory "tensorflow" in there confuses python. Try running python from another directory; let us know if import tensorflow does not work then.

  5. added a commit that references this issue on Mar 9, 2016
  6. added a commit that references this issue on Oct 5, 2018
  7. added a commit that references this issue on Dec 6, 2019
  8. added a commit that references this issue on May 17, 2022
  9. added 5 commits that reference this issue on Sep 5, 2024
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