You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After building TF V1.4 (master) from source on a Mac running High Sierra, and running Tensorboard, I get the following error.
$ tensorboard --logdir=/tmp/cifar10_train
Traceback (most recent call last):
File "/usr/local/bin/tensorboard", line 7, in <module>
from tensorboard.main import run_main
ImportError: cannot import name 'run_main'
This previously worked before I built TF from source insstalling it via: pip3 install --upgrade tensorflow. I tried deleting /tmp/cifar10_train, but it did not help. Any ideas?
@nfelt Thank you for your response! Here is what I did to build TF from source. I'm new to TF and all these build tools. BTW, this is after I did a clone from TF master commit dd788dbbfa544c1ea4768940ac4300c22bb7e88e on Dec 4th. I'll pull the latest updates and try again...
$ which tensorboard
/usr/local/bin/tensorboard
I invoked tensorboard from ~.
Compile TF from source
Install XCode via AppStore.
Bazel is a software dependency and build tool similar to ANT and Maven. Installation Instructions are here.
brew install bazel
bazel version
brew upgrade bazel
pip3 install six numpy wheel
brew install coreutils
The C++ API (and the backend of the system) is in tensorflow/core.
xcode-select --install (might be able to skip this actually if XCode is installed.)
cd path/to/tensorflow
mkdir /tmp/tensorflow_pkg
We need a custom build_tf.sh because we didn't install Python the recommended way using VirtualEnv. The source of our build file is here. This retrieves all CPU features and applies some of them to build TF, which makes TF faster as it will utilize specialized CPU instructions if your computer has them.
The tensorflow pip package by default depends on tensorflow-tensorboard; tb-nightly is the nightly build of tensorboard. In your case the version of tensorflow at HEAD that you were building creates the tensorboard script calling run_main (a recent change from the old main method name), so for that to work it requires a newer version of tensorboard than the stable release.
Reacted by Tim Molter, Christoph Rist, Vitalie Spinu and Initiativethinker
What exactly do you mean by no "tb-nightly" could be found? Is there no access to pip on your platform?
If you can't install tensorboard from a package at all, I think your only real option is downloading the sources from the git repository here and trying to build it locally, but I can't really guarantee if that will work.
Activity
nfelt commentedon Dec 13, 2017
Can you provide the exact steps you're using to build? Ideally such that you can reproduce it via a sequence of steps from
git cloneonwards.Specifically, what's the
tensorboardbinary that you're invoking here? And what directory are you invoking it from?timmolter commentedon Dec 13, 2017
@nfelt Thank you for your response! Here is what I did to build TF from source. I'm new to TF and all these build tools. BTW, this is after I did a clone from TF master commit dd788dbbfa544c1ea4768940ac4300c22bb7e88e on Dec 4th. I'll pull the latest updates and try again...
I invoked tensorboard from
~.Compile TF from source
Install XCode via AppStore.
Bazel is a software dependency and build tool similar to ANT and Maven. Installation Instructions are here.
The C++ API (and the backend of the system) is in
tensorflow/core.We need a custom
build_tf.shbecause we didn't install Python the recommended way using VirtualEnv. The source of our build file is here. This retrieves all CPU features and applies some of them to build TF, which makes TF faster as it will utilize specialized CPU instructions if your computer has them.Here is our
build_tf.sh:Notice the commented out line:
#./configure, which you'll need to run the first time to configure tensorflow. To run the script run:Make sure the file is executable!
chmod +x build_tf.shPath to python, when asked, is:
The first build might take over two hours!
Re-run an example
python3 tensorflow/examples/tutorials/mnist/mnist_softmax.py
Congratulations!!
timmolter commentedon Dec 13, 2017
Here's a recent S.O. reference to this issue: https://stackoverflow.com/q/47762691/1625820
timmolter commentedon Dec 13, 2017
OK, I rebuilt after updating to the latest commit on tensorflow master and got the same error.
jart commentedon Dec 13, 2017
If you're building TensorFlow from source please
pip install tb-nightly.timmolter commentedon Dec 13, 2017
running
pip install tb-nightlyindeed fixed the issue. I don't know what that does, but thanks a lot!nfelt commentedon Dec 13, 2017
The tensorflow pip package by default depends on
tensorflow-tensorboard;tb-nightlyis the nightly build of tensorboard. In your case the version of tensorflow at HEAD that you were building creates the tensorboard script callingrun_main(a recent change from the old main method name), so for that to work it requires a newer version of tensorboard than the stable release.nfelt commentedon Jan 9, 2018
What exactly do you mean by no "tb-nightly" could be found? Is there no access to pip on your platform?
If you can't install tensorboard from a package at all, I think your only real option is downloading the sources from the git repository here and trying to build it locally, but I can't really guarantee if that will work.