我已经在我的 ubuntu 系统中编译了 protobuf 2.6.0 源代码,一旦我想导入 caffe,它就会显示以下错误:
/usr/local/lib/python3.5/dist-packages/caffe/__init__.py:30: UserWarning: Caffe datatype DOUBLE not available.
warnings.warn("Caffe datatype DOUBLE not available.")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/dist-packages/caffe/__init__.py", line 41, in <module>
from .proto.caffe_pb2 import TRAIN, TEST
File "/usr/local/lib/python3.5/dist-packages/caffe/proto/caffe_pb2.py", line 6, in <module>
from google.protobuf.internal import enum_type_wrapper
ImportError: No module named 'google.protobuf'
>>>
[11]+ Stopped python3
我已经在.bashrc
export中导出了 protobuf 路径LD_LIBRARY_PATH=/usr/local/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
caffe 是由 Python3 构建的。如何解决这个问题?