sudo python setup.py install 一直报错
running install
running bdist_egg
running egg_info
writing requirements to protobuf.egg-info/requires.txt
writing protobuf.egg-info/PKG-INFO
writing namespace_packages to protobuf.egg-info/namespace_packages.txt
writing top-level names to protobuf.egg-info/top_level.txt
writing dependency_links to protobuf.egg-info/dependency_links.txt
file google/protobuf/descriptor_pb2.py (for module google.protobuf.descriptor_pb2) not found
error: package directory 'google/protobuf/compiler' does not exist
解决:
把/usr/local/include/google/protobuf/compiler复制到protobuf/python文件夹下面就可以了!
最后:
Finished processing dependencies for protobuf==2.6.1