1.ModuleNotFoundError: no module named google
用
~/anaconda3/bin/pip install protobuf
安装
protobuf千万不要用conda install来安装,要用~/anaconda2/bin/pip install protobuf 安装,不然import caffe会出现ImportError: No module named google.protobuf.internal
进行完这一步之后又出现了下面一个错误:
2. TypeError: expected bytes,str found
Failed to include caffe_pb2, things might go wrong!
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/abc/workplace/caffe/python/caffe/__init__.py", line 4, in <module>
from .proto.caffe_pb2 import TRAIN, TEST
File "/home/abc/workplace/caffe/python/caffe/proto/caffe_pb2.py", line 17, in <module>
serialized_pb='\n\x0b\x63\x61\x66\x66\x65.proto\x12\x05\x63\x61\x66\x66\x65\"\x1c\n\tBlobShape\x12\x0f\n\x03\x64i...'
File "/home/abc/ana