Failed to include caffe_pb2, things might go wrong! Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/david/download/caffe-master/python/caffe/__init__.py", line 4, in <module> from .proto.caffe_pb2 import TRAIN, TEST File "/home/david/download/caffe-master/python/caffe/proto/caffe_pb2.py", line 7, in <module> from google.protobuf import reflection as _reflection File "/home/david/opt/anaconda3/lib/python3.5/site-packages/google/protobuf/reflection.py", line 68, in <module> from google.protobuf.internal import python_message File "/home/david/opt/anaconda3/lib/python3.5/site-packages/google/protobuf/internal/python_message.py", line 848 except struct.error, e: ^ SyntaxError: invalid syntax
方法:安装protobuf
发现仍错误,删除conda的protobuf;只用pip安装的;
利用 conda uninstall protobuf
然后 pip install protobuf>=3.4.0