PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp and ImportError: cannot import name _message

536 views
Skip to first unread message

Yan Yan

unread,
Jul 23, 2016, 6:19:19 AM7/23/16
to grpc.io
It failed when I set "PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp". It works when I don't set it.


osboxes@centos7_rpc4 ~/Downloads/github.com/grpc/grpc/examples/python/route_guide
$ export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp

osboxes@centos7_rpc4 ~/Downloads/github.com/grpc/grpc/examples/python/route_guide
$ python ./route_guide_server.py
I0723 11:17:54.675572992   54257 ev_epoll_linux.c:85]        epoll engine will be using signal: 36
D0723 11:17:54.675605774   54257 ev_posix.c:106]             Using polling engine: epoll
Traceback (most recent call last):
  File "./route_guide_server.py", line 35, in <module>
    import route_guide_pb2
  File "/home/osboxes/Downloads/github.com/grpc/grpc/examples/python/route_guide/route_guide_pb2.py", line 6, in <module>
    from google.protobuf import descriptor as _descriptor
  File "/usr/lib/python2.7/site-packages/protobuf-3.0.0b3-py2.7.egg/google/protobuf/descriptor.py", line 46, in <module>
    from google.protobuf.pyext import _message
ImportError: cannot import name _message

Reply all
Reply to author
Forward
0 new messages