question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError: cannot import name 'run_main'

See original GitHub issue

This is in reference to an issue already posted at https://github.com/tensorflow/tensorflow/issues/14855.

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?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
jartcommented, Dec 13, 2017

If you’re building TensorFlow from source please pip install tb-nightly.

4reactions
nfeltcommented, Dec 13, 2017

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tensorboard cannot import name `run_main` - python
I am getting this error regardless of whether I provide a log directory. What is the fix and what can I do to...
Read more >
ImportError: cannot import name 'smartplug' · Issue #87
oops..i cloned the repo and tried executing this program: import asyncio from kasa import SmartPlug from pprint import pformat as pf. async def...
Read more >
How to Fix ImportError: Cannot Import Name in Python
The Python ImportError: cannot import name error occurs when an imported class is not accessible or is in a circular dependency.
Read more >
Python import: Advanced Techniques and Tips
In Python, you use the import keyword to make code in one module available in another. Imports in Python are important for structuring...
Read more >
Issue 542389: "cannot import name" and other problems
I placed "import code" and etc. in my main executable (compile root) and it started to work, but now complained about other includes:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found