New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip installed tensorboard producing "importerror" #207

Closed
wxp0329 opened this Issue Jul 8, 2017 · 12 comments

Comments

Projects
None yet
9 participants
@wxp0329

wxp0329 commented Jul 8, 2017

when I run tensorboard --logdir=/home/wangxiaopeng/models-master/object_detection/data/train_dir/, it generate the erro:
Traceback (most recent call last):
File "/usr/local/bin/tensorboard", line 7, in
from tensorflow.tensorboard.tensorboard import main
ImportError: No module named tensorboard

@decentralion decentralion changed the title from tensorboard --logdir=/home/wangxiaopeng/models-master/object_detection/data/train_dir/ Traceback (most recent call last): File "/usr/local/bin/tensorboard", line 7, in <module> from tensorflow.tensorboard.tensorboard import main ImportError: No module named tensorboard to pip installed tensorboard producing "importerror" Jul 10, 2017

@decentralion

This comment has been minimized.

Contributor

decentralion commented Jul 10, 2017

Let me get back to you on this in a few days, when we release a new TensorBoard via pip.

@decentralion decentralion self-assigned this Jul 10, 2017

@decentralion

This comment has been minimized.

Contributor

decentralion commented Jul 19, 2017

Actually:

Looking at this, I see you're getting from tensorflow.tensorboard, which is code that existed in the TensorFlow pip package, but not in the current one. It might be an upgrade pain from moving tensorboard out of the tensorflow pip package and into (for now) tensorflow-tensorboard.

Could you tell me how you got TensorBoard? Was it via pip install tensorflow or pip install tensorflow-tensorboard?

@wxp0329

This comment has been minimized.

wxp0329 commented Jul 22, 2017

hello @dandelionmane , i via pip install tensorflow to get TensorBoard, and i try to use pip uninstall tensorboard is failed :" Cannot uninstall requirement tensorboard, not installed"

@wxp0329

This comment has been minimized.

wxp0329 commented Jul 22, 2017

@dandelionmane i try to using pip install tensorboard-master(1).zip ,generate error below:
Unpacking ./tensorboard-master(1).zip
Running setup.py (path:/tmp/pip-RBbATz-build/setup.py) egg_info for package from file:///home/wangxiaopeng/tensorboard-master%281%29.zip
Traceback (most recent call last):
File "", line 17, in
IOError: [Errno 2] No such file or directory: '/tmp/pip-RBbATz-build/setup.py'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

File "", line 17, in

IOError: [Errno 2] No such file or directory: '/tmp/pip-RBbATz-build/setup.py'

@argman

This comment has been minimized.

argman commented Jul 24, 2017

@dandelionmane how to use pip installed tensorboard as a bin file like before? not via bazel

@wchargin

This comment has been minimized.

Member

wchargin commented Aug 17, 2017

@wxp0329 Please note that the name of our pip package is tensorflow-tensorboard and not tensorboard. tensorboard is an unaffiliated project.

It also looks like you're trying to install our git repository directly as a wheel; that won't work. Please try using pip install --upgrade tensorflow tensorflow-tensorboard.

@wchargin

This comment has been minimized.

Member

wchargin commented Aug 17, 2017

@argman The command that you're looking for is pip install --upgrade tensorflow tensorflow-tensorboard.

@monajalal

This comment has been minimized.

monajalal commented Nov 13, 2017

@wchargin after entering what you said, I get this:

Mon Nov 13 00:37:49 :~$  /Users/mona/anaconda/bin/pip  install --upgrade tensorflow tensorflow-tensorboard
Collecting tensorflow
  Downloading tensorflow-1.4.0-cp36-cp36m-macosx_10_11_x86_64.whl (39.3MB)
    100% |████████████████████████████████| 39.3MB 28kB/s
Collecting tensorflow-tensorboard
  Downloading tensorflow_tensorboard-0.1.8-py3-none-any.whl (1.6MB)
    100% |████████████████████████████████| 1.6MB 560kB/s
Collecting wheel>=0.26 (from tensorflow)
  Downloading wheel-0.30.0-py2.py3-none-any.whl (49kB)
    100% |████████████████████████████████| 51kB 604kB/s
Collecting protobuf>=3.3.0 (from tensorflow)
  Downloading protobuf-3.4.0-py2.py3-none-any.whl (375kB)
    100% |████████████████████████████████| 378kB 57kB/s
Collecting numpy>=1.12.1 (from tensorflow)
  Downloading numpy-1.13.3-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (4.5MB)
    100% |████████████████████████████████| 4.6MB 200kB/s
Collecting enum34>=1.1.6 (from tensorflow)
  Downloading enum34-1.1.6-py3-none-any.whl
Collecting six>=1.10.0 (from tensorflow)
  Using cached six-1.11.0-py2.py3-none-any.whl
Requirement already up-to-date: werkzeug>=0.11.10 in ./anaconda/lib/python3.6/site-packages (from tensorflow-tensorboard)
Requirement already up-to-date: bleach==1.5.0 in ./anaconda/lib/python3.6/site-packages (from tensorflow-tensorboard)
Requirement already up-to-date: markdown>=2.6.8 in ./anaconda/lib/python3.6/site-packages (from tensorflow-tensorboard)
Requirement already up-to-date: html5lib==0.9999999 in ./anaconda/lib/python3.6/site-packages (from tensorflow-tensorboard)
Collecting setuptools (from protobuf>=3.3.0->tensorflow)
  Downloading setuptools-36.7.1-py2.py3-none-any.whl (482kB)
    100% |████████████████████████████████| 491kB 883kB/s
Installing collected packages: wheel, six, setuptools, protobuf, numpy, tensorflow-tensorboard, enum34, tensorflow
  Found existing installation: wheel 0.29.0
    Uninstalling wheel-0.29.0:
      Successfully uninstalled wheel-0.29.0
  Found existing installation: six 1.10.0
    Uninstalling six-1.10.0:
      Successfully uninstalled six-1.10.0
  Found existing installation: setuptools 36.5.0.post20170921
    Uninstalling setuptools-36.5.0.post20170921:
      Successfully uninstalled setuptools-36.5.0.post20170921
  Found existing installation: protobuf 3.3.2
    Uninstalling protobuf-3.3.2:
      Successfully uninstalled protobuf-3.3.2
  Found existing installation: numpy 1.12.1
    Uninstalling numpy-1.12.1:
      Successfully uninstalled numpy-1.12.1
  Found existing installation: tensorflow 1.1.0
    Uninstalling tensorflow-1.1.0:
      Successfully uninstalled tensorflow-1.1.0
Successfully installed enum34-1.1.6 numpy-1.13.3 protobuf-3.4.0 setuptools-36.7.1 six-1.11.0 tensorflow-1.4.0 tensorflow-tensorboard-0.1.8 wheel-0.30.0
Mon Nov 13 00:40:10 :~$ tensorboard --logdir=/var/folders/bk/2b2d879912bgnl5s768s7crh0000gn/T/tmpzy0cj6xc
Traceback (most recent call last):
  File "/Users/mona/anaconda/bin/tensorboard", line 7, in <module>
    from tensorboard.main import main
  File "/Users/mona/anaconda/lib/python3.6/site-packages/tensorboard/main.py", line 29, in <module>
    import tensorflow as tf
  File "/Users/mona/anaconda/lib/python3.6/site-packages/tensorflow/__init__.py", line 24, in <module>
    from tensorflow.python import *
  File "/Users/mona/anaconda/lib/python3.6/site-packages/tensorflow/python/__init__.py", line 52, in <module>
    from tensorflow.core.framework.graph_pb2 import *
  File "/Users/mona/anaconda/lib/python3.6/site-packages/tensorflow/core/framework/graph_pb2.py", line 10, in <module>
    from google.protobuf import descriptor_pb2
  File "/Users/mona/anaconda/lib/python3.6/site-packages/google/protobuf/descriptor_pb2.py", line 409, in <module>
    options=None),
  File "/Users/mona/anaconda/lib/python3.6/site-packages/google/protobuf/descriptor.py", line 501, in __new__
    return _message.default_pool.FindFieldByName(full_name)
KeyError: "Couldn't find field google.protobuf.DescriptorProto.ExtensionRange.options"
Mon Nov 13 00:40:22 :~$

What should I do now?

@Surya97

This comment has been minimized.

Surya97 commented Nov 17, 2017

I am using Ubuntu 17.10 and I have installed tensorflow and tensorboard as follows: pip3 install --upgrade tensorflow tensorflow-tensorboard
After successful installation when I try using : tensorboard logdir I am getting error "tensorboard: command not found"

I have a small doubt. Does tensorboard work only when GPU Nvidea is present?

@secsilm

This comment has been minimized.

secsilm commented Dec 10, 2017

@Surya97 Same issue. python -m tensorboard.main --logdir=/your/model/dir solved my problem.

@nfelt

This comment has been minimized.

Collaborator

nfelt commented Dec 12, 2017

Closing out this issue as @wxp0329 (the OP) seems to have resolved their concern.

For the others posting, please open a new issue specific to your problem if you're still encountering it.

@monajalal - Hmm, I think that might be an issue specific to anaconda python, see tensorflow/tensorflow#12326 for some possible workarounds.

@Surya97 & @secsilm - TensorBoard should work regardless of what GPU you have. The "tensorboard: command not found" error looks like it's from your shell, so it might mean that your $PATH isn't set up correctly to include the tensorboard binary as installed by pip. I'd check your $PATH and if that's still not working, I recommend asking on StackOverflow (with the TensorBoard tag) since more people will see it there, and then filing a new GitHub issue only if you're pretty sure it's a bug in TensorBoard itself versus your specific installation process not working. Thanks!

@nfelt nfelt closed this Dec 12, 2017

@Sangramsingkayte

This comment has been minimized.

Sangramsingkayte commented Jan 16, 2018

Traceback (most recent call last):
File "train.py", line 44, in
import tensorboard_logger
ModuleNotFoundError: No module named 'tensorboard_logger'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment