>>> import caffeTraceback (most recent call last):Ā File "<stdin>", line 1, in <module>Ā File "/home/user/bin/caffe/python/caffe/__init__.py", line 1, in <module>Ā Ā from .pycaffe import Net, SGDSolverĀ File "/home/user/bin/caffe/python/caffe/pycaffe.py", line 14, in <module>Ā Ā import caffe.ioĀ File "/home/user/bin/caffe/python/caffe/io.py", line 8, in <module>Ā Ā from caffe.proto import caffe_pb2Ā File "/home/user/bin/caffe/python/caffe/proto/caffe_pb2.py", line 4, in <module>Ā Ā from google.protobuf.internal import enum_type_wrapperImportError: No module named google.protobuf.internal
Note that the PYTHONPATH is properly configured. And I have the protobuf (see below):/usr/include/google/protobuf/usr/include/google/protobuf/descriptor.h/usr/include/google/protobuf/descriptor.pb.h/usr/include/google/protobuf/descriptor.proto.../usr/include/google/protobuf/stubs/platform_macros.h/usr/include/google/protobuf/stubs/template_util.h/usr/include/google/protobuf/stubs/type_traits.hINCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include
[xxw345@gpu002t caffe]$ pythonPython 2.7.12 |Anaconda custom (64-bit)| (default, Jul Ā 2 2016, 17:42:40)[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2Type "help", "copyright", "credits" or "license" for more information.Anaconda is brought to you by Continuum Analytics.Please check out: http://continuum.io/thanks and https://anaconda.org>>> import google.protobuf
>>> import caffeTraceback (most recent call last):Ā File "<stdin>", line 1, in <module>
Ā File "/home/xxw345/caffe/python/caffe/__init__.py", line 1, in <module>Ā Ā from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolverĀ File "/home/xxw345/caffe/python/caffe/pycaffe.py", line 15, in <module>Ā Ā import caffe.ioĀ File "/home/xxw345/caffe/python/caffe/io.py", line 8, in <module>Ā Ā from caffe.proto import caffe_pb2Ā File "/home/xxw345/caffe/python/caffe/proto/caffe_pb2.py", line 6, in <module>Ā Ā from google.protobuf.internal import enum_type_wrapperImportError: No module named internal
[xxw345@gpu002t caffe]$ pythonPython 2.7.12 |Anaconda custom (64-bit)| (default, Jul Ā 2 2016, 17:42:40)[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2Type "help", "copyright", "credits" or "license" for more information.Anaconda is brought to you by Continuum Analytics.Please check out: http://continuum.io/thanks and https://anaconda.org>>> import google.protobuf>>> print google.protobuf.__file__/home/xxw345/.local/lib/python2.7/site-packages/google/protobuf/__init__.pyc
[xxw345@gpu002t caffe]$ which protoc~/.usr/local/bin/protoc[xxw345@gpu002t caffe]$ ~/anaconda2/bin/pip install protobufRequirement already satisfied (use --upgrade to upgrade): protobuf in /home/xxw345/.local/lib/python2.7/site-packagesRequirement already satisfied (use --upgrade to upgrade): six>=1.9 in /home/xxw345/anaconda2/lib/python2.7/site-packages (from protobuf)Requirement already satisfied (use --upgrade to upgrade): setuptools in /home/xxw345/anaconda2/lib/python2.7/site-packages/setuptools-23.0.0-py2.7.egg (from protobuf)
[xxw345@gpu002t caffe]$ ~/anaconda2/bin/pip uninstall protobufUninstalling protobuf-3.0.0:Ā /home/xxw345/.local/lib/python2.7/site-packages/protobuf-3.0.0-py2.7-nspkg.pthĀ /home/xxw345/.local/lib/python2.7/site-packages/protobuf-3.0.0.dist-info/DESCRIPTION.rstĀ /home/xxw345/.local/lib/python2.7/site-packages/protobuf-3.0.0.dist-info/METADATAĀ /home/xxw345/.local/lib/python2.7/site-packages/protobuf-3.0.0.dist-info/RECORDĀ /home/xxw345/.local/lib/python2.7/site-packages/protobuf-3.0.0.dist-info/WHEELĀ /home/xxw345/.local/lib/python2.7/site-packages/protobuf-3.0.0.dist-info/metadata.jsonĀ /home/xxw345/.local/lib/python2.7/site-packages/protobuf-3.0.0.dist-info/namespace_packages.txtĀ /home/xxw345/.local/lib/python2.7/site-packages/protobuf-3.0.0.dist-info/top_level.txtProceed (y/n)? yĀ Successfully uninstalled protobuf-3.0.0
[xxw345@gpu002t caffe]$ ~/anaconda2/bin/pip install protobufCollecting protobufĀ Using cached protobuf-3.0.0-py2.py3-none-any.whlRequirement already satisfied (use --upgrade to upgrade): six>=1.9 in /home/xxw345/anaconda2/lib/python2.7/site-packages (from protobuf)Requirement already satisfied (use --upgrade to upgrade): setuptools in /home/xxw345/anaconda2/lib/python2.7/site-packages/setuptools-23.0.0-py2.7.egg (from protobuf)Installing collected packages: protobufSuccessfully installed protobuf-3.0.0
[xxw345@gpu002t caffe]$ ~/anaconda2/bin/pip install protobufRequirement already satisfied (use --upgrade to upgrade): protobuf in /home/xxw345/anaconda2/lib/python2.7/site-packagesRequirement already satisfied (use --upgrade to upgrade): six>=1.9 in /home/xxw345/anaconda2/lib/python2.7/site-packages (from protobuf)Requirement already satisfied (use --upgrade to upgrade): setuptools in /home/xxw345/anaconda2/lib/python2.7/site-packages/setuptools-23.0.0-py2.7.egg (from protobuf)
[xxw345@gpu002t caffe]$ pythonPython 2.7.12 |Anaconda custom (64-bit)| (default, Jul Ā 2 2016, 17:42:40)[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2Type "help", "copyright", "credits" or "license" for more information.Anaconda is brought to you by Continuum Analytics.Please check out: http://continuum.io/thanks and https://anaconda.org>>> import caffe>>>