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.
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
Thanks PlasmaSheep. You solved my protobuf problem for both caffe and tensorflow.
This fixed the issue for me as well.
@sara-eb: seems like an unrelated problem, you should open a new issue or try stackoverflow
@abendebury I deleted my question from here. Thank you
Most helpful comment
Fixed.