title: NameError: name 'unicode' is not defined when compile with python3
body: <p>I am trying to compiled caffe with python3. After the compilation when I am trying to import caffe I am getting follwing error</p>
  
  <pre><code>In [1]: import caffe
  Failed to include caffe_pb2, things might go wrong!
  ---------------------------------------------------------------------------
  NameError                                 Traceback (most recent call last)
  &lt;ipython-input-1-1cca3aa1f8c5&gt; in &lt;module&gt;()
  ----&gt; 1 import caffe
  
  /library_install_dir/caffe/python/caffe/__init__.py in &lt;module&gt;()
        1 from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver
        2 from ._caffe import set_mode_cpu, set_mode_gpu, set_device, Layer, get_solver, layer_type_list
  ----&gt; 3 from .proto.caffe_pb2 import TRAIN, TEST
        4 from .classifier import Classifier
        5 from .detector import Detector
  
  /library_install_dir/caffe/python/caffe/proto/caffe_pb2.py in &lt;module&gt;()
      975       name='type', full_name='caffe.FillerParameter.type', index=0,
      976       number=1, type=9, cpp_type=9, label=1,
  --&gt; 977       has_default_value=True, default_value=unicode("constant", "utf-8"),
      978       message_type=None, enum_type=None, containing_type=None,
      979       is_extension=False, extension_scope=None,
  
  NameError: name 'unicode' is not defined
  </code></pre>
  
  <ul>
  <li>The issue is Python 3 renamed the unicode type to str, the old str type has been replaced by bytes. </li>
  </ul>
  
  <p>I tried to modify the proto/caffe_pb2 but it is not working. </p>
  
  <p>Anyone having similar issue with caffe. I have a working caffe with python3 support in my bare metal Now I am trying to dockerize it.</p>
  
  <p>Thanks in advance.</p>