下载路径:
安装步骤:
./configure --prefix=/usr/local
make
make install
安装完成之后进入Python目录
python setup.py install #安装
python setup.py test #测试
第一次出现这个问题:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "data_proto.py", line 4, in <module>
from google.protobuf import descriptor as _descriptor
ImportError: No module named google.protobuf
解决办法:
参考链接:
https://blog.csdn.net/qinglu000/article/details/17242011
遇到问题:
error: package directory 'google/protobuf/compiler' does not exist
解决办法:
手动创建该路径即可