-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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' (/usr/lib/python3.7/site-packages/google/protobuf/pyext/__init__.py) #1566
Comments
@chroteus It looks like you don't have the C++ implementation of protobuf available, and I guess protobuf doesn't check for that before attempting to use it. What version of python protobuf are you using and how did you install it (e.g. via pip)? I just checked and the pip builds for python protobuf include the C++ implementation starting with 3.5.2, so if your version is below that could you try updating and see if that fixes it? If so we can update our setup.py dep to avoid this issue going forward. |
I have it installed it using Arch's package manager (Pacman). I will try uninstalling with Pacman and see if installing everything through pip will work. EDIT: It seems the issue is with me using Python 3.7. I will downgrade and see if this is the case. |
Hmm, strange. Perhaps there's some way in which the pacman-installed python-protobuf C++ deps aren't being found appropriately under python 3.7. Can you reproduce the issue with only protobuf? E.g. perhaps something like |
I have the same issue. |
Found a solution here:
|
@gariepyalex Thanks for the additional detail! I didn't have to set the env variable at installation time for pip packages on debian or mac. I had assumed the same would be true for windows but based on the StackOverflow question, perhaps not. I see here that maybe windows still omits the C++ dep: @chroteus I'm not really familiar at all with Pacman but is it possible the python-protobuf package there is not actually bundling/building the C++ extension code, even though it depends on the C++ protobuf package? And I guess if the Empty test doesn't work it's perhaps better to directly check if |
@chroteus FYI - I ran into this issue when running TensorBoard without the regular google protobuf pip package actually being available. I.e. Note that this wouldn't apply to the problem as seen by @gariepyalex since in that case importing google.protobuf directly seems to work? |
Like @chroteus said, it is an issue with the CPP implementation of protobuf not being compiled for python 3.7 yet: protocolbuffers/protobuf#5154 |
https://bugs.archlinux.org/task/54959 Please don't break your system with sudo pip, by the way. |
I'm using arch linux, and this problem seems to start from tensorboard 1.11.0 and is still not solved by now. |
I met this problem at tensorboard 1.12.0 and I solved it by downgrading tensorboard to 1.11.0. |
The latest version that seems to work is |
Another ArchLinux guy with the same issue. Fixed by updating |
I just want to add, even if you're using a |
I met the same problem and I failed to solve it. The anaconda prompt showed that my protobuf is 3.4.0 and my tensorflow is 1.12.0 tensorboard is 1.12.2. Is there any solution for me to solve it? Or can I find another way to figure out the average precision?(I am a beginner) |
I met this problem in Windows environment and failed to solve it according to the guides previously mentioned. |
i am also see the issue ,i do not know how to do ,my environment is : |
I had the same problem and it seemed that Python 3.7 was not yet supported: |
There's a recent release of protobuf in Feb (3.7.0rc2), although it's still a RC build. Install that and it should solve the issue. I've tested this on Python 3.7.1 + TensorBoard 1.12.2 |
I've tested this and solved the issue |
Thanks for bearing with us, everyone - today's 1.13.0 release should fix this issue via PR #1887. Please try updating to 1.13.0. |
I had tensorflow 1.12 + tensorboard 1.12. with this issue. |
@zhaoyongboy if upgrading to 1.13.0 didn't work for you can you provide the exact steps you used to do that upgrade, and the output of To resolve this issue via upgrade to 1.13.0 you may need to uninstall |
Issue: Just calling tensorboard fails to load. A bug with protobuf?
The text was updated successfully, but these errors were encountered: