Skip to content
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

ImportError: cannot import name '_message' from 'google.protobuf.pyext' #5775

Closed
marvinjuette opened this issue Feb 25, 2019 · 2 comments
Closed

Comments

@marvinjuette
Copy link

I am programming with tensorflow and when I try to run tensorboard I get the following error message:

Traceback (most recent call last):
  File "c:\program files\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\program files\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Program Files\Python37\Scripts\tensorboard.exe\__main__.py", line 5, in <module>
  File "c:\program files\python37\lib\site-packages\tensorboard\main.py", line 45, in <module>
    from tensorboard import default
  File "c:\program files\python37\lib\site-packages\tensorboard\default.py", line 34, in <module>
    import tensorflow as tf
  File "c:\program files\python37\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "c:\program files\python37\lib\site-packages\tensorflow\python\__init__.py", line 52, in <module>
    from tensorflow.core.framework.graph_pb2 import *
  File "c:\program files\python37\lib\site-packages\tensorflow\core\framework\graph_pb2.py", line 6, in <module>
    from google.protobuf import descriptor as _descriptor
  File "c:\program files\python37\lib\site-packages\google\protobuf\descriptor.py", line 47, in <module>
    from google.protobuf.pyext import _message
ImportError: cannot import name '_message' from 'google.protobuf.pyext' (c:\program files\python37\lib\site-packages\google\protobuf\pyext\__init__.py)

I tried to reinstall everything and even use older versions of tf and protobuf, but it still doesn't work.

image

Python Version: 3.7
Tensorflow-Version: 1.13.0rc2
Protobuf-Version: 3.6.1
Windows 10

@TeBoring
Copy link
Contributor

You need to update protobuf to 3.7.0rc3 for python 3.7

@dbivolaru
Copy link

I ran into a similar issue and couldn't find any 3.7.0rc3 in any Fedora repositories (FC30, updates-testing, rawhide). For the ones that stumble upon this from google search, here are my steps to get it working (surgical strike):

$ sudo dnf remove python3-protobuf
$ pip3 install protobuf

This works with the existing rpm-based protobuf-*.3.6.1-3.fc30 packages based on my testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants