1

I have compiled protobuf 2.6.0 source code in my ubuntu system, once I wanna import caffe, it is showing the following error:

/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

I have exported the protobuf path in .bashrc export LD_LIBRARY_PATH=/usr/local/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

the caffe is built by Python3. How to resolve this issue?

sc241
  • 189
  • 17

2 Answers2

0

Have you run make install after compilation?

Eduardo Soares
  • 992
  • 4
  • 14
0

I suggest you remove and install again. If you use Conda, make sure you remove it from pip and Conda. Here is an issue opened in the community

Hazarapet Tunanyan
  • 2,809
  • 26
  • 30