Debug Caffe

1257 ワード

ImportError: cannot import name symbol_database 
>>> import caffe
Traceback (most recent call last):
  File "", line 1, in 
  File "/opt/caffe/python/caffe/__init__.py", line 1, in 
    from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver
  File "/opt/caffe/python/caffe/pycaffe.py", line 15, in 
    import caffe.io
  File "/opt/caffe/python/caffe/io.py", line 8, in 
    from caffe.proto import caffe_pb2
  File "/opt/caffe/python/caffe/proto/caffe_pb2.py", line 10, in 
    from google.protobuf import symbol_database as _symbol_database
ImportError: cannot import name symbol_database

解決する
$  apt-get install libprotobuf-dev protobuf-compiler 
Reading package lists... Done
Building dependency tree
Reading state information... Done
libprotobuf-dev is already the newest version (2.6.1-1.3).
protobuf-compiler is already the newest version (2.6.1-1.3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

$  pip install protobuf==2.6
#      ,caffe     3.0.0(   )   protobuf.