ImportError: No module named google.protobuf.internal

1,995 views
Skip to first unread message

PO-YU KAO

unread,
Jul 5, 2016, 8:26:19 PM7/5/16
to Caffe Users
Hello,

I tried to install caffe on my Ubuntu 14.04 machine. It work outside the virtual environment but it does not work inside the virtual environment. 

pkao@vader:~$ workon nnet
(nnet) pkao@vader:~$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import caffe
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/pkao/caffe/python/caffe/__init__.py", line 1, in <module>
    from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver
  File "/home/pkao/caffe/python/caffe/pycaffe.py", line 15, in <module>
    import caffe.io
  File "/home/pkao/caffe/python/caffe/io.py", line 8, in <module>
    from caffe.proto import caffe_pb2
  File "/home/pkao/caffe/python/caffe/proto/caffe_pb2.py", line 4, in <module>
    from google.protobuf.internal import enum_type_wrapper
ImportError: No module named google.protobuf.internal

Can anyone help me to solve this problem? Thanks!

山沐风

unread,
Feb 6, 2017, 7:41:43 AM2/6/17
to Caffe Users
I fix this problem by: pip install protobuf --user

在 2016年7月6日星期三 UTC+8上午8:26:19,PO-YU KAO写道:
Reply all
Reply to author
Forward
0 new messages