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

Cannot import descriptor #574

Closed
abendebury opened this issue Jul 8, 2015 · 5 comments
Closed

Cannot import descriptor #574

abendebury opened this issue Jul 8, 2015 · 5 comments

Comments

@abendebury
Copy link

I cannot successfully import descriptor.py.

$ python
Python 2.7.6 (default, Sep  9 2014, 15:04:36)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from google.protobuf import descriptor as _descriptor
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/2.7/site-packages/protobuf-2.6.1-py2.7.egg/google/protobuf/descriptor.py", line 50, in <module>
    from google.protobuf.pyext import _message
ImportError: cannot import name _message
>>> ^D
$ protoc --version
libprotoc 2.6.1

Running on OSX 10.10.

@abendebury
Copy link
Author

Fixed.

$ pip uninstall protobuf
$ brew install protobuf
$ mkdir -p /Users/alexeibendebury/Library/Python/2.7/lib/python/site-packages
$ echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/alexeibendebury/Library/Python/2.7/lib/python/site-packages/homebrew.pth

@ahmaurya
Copy link

Thanks PlasmaSheep. You solved my protobuf problem for both caffe and tensorflow.

@chrisabrams
Copy link

This fixed the issue for me as well.

@abendebury
Copy link
Author

@sara-eb: seems like an unrelated problem, you should open a new issue or try stackoverflow

@sara-eb
Copy link

sara-eb commented Jul 7, 2018

@abendebury I deleted my question from here. Thank you

adellahlou pushed a commit to adellahlou/protobuf that referenced this issue Apr 20, 2023
adellahlou pushed a commit to adellahlou/protobuf that referenced this issue Apr 20, 2023
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

4 participants