原文地址:https://blog.csdn.net/u013210620/article/details/81317731
protobuf源碼地址:https://github.com/protocolbuffers/protobuf/releases
github地址:https://github.com/protocolbuffers/protobuf
1.使用wget命令下載
wget https://github.com/google/protobuf/releases/download/v3.6.0/protobuf-python-3.6.0.tar.gz
2.解壓、編譯、安裝
tar zxvf protobuf-python-3.6.0.tar.gz
cd protobuf-3.6.0
./configure
make
make check
make install
3.繼續(xù)安裝protobuf的python模塊
cd ./python
python setup.py build
python setup.py test
python setup.py install
4.安裝完成赵誓,驗(yàn)證Linux命令
protoc --version
5.驗(yàn)證安裝
import google.protobuf