首先這篇文章是參考的https://github.com/vak/protobuf2umlpython
本篇文章都是基於python3的git
下面首先咱們說一下python3的安裝github
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.7.1/protobuf-all-3.7.1.tar.gz tar -xvf protobuf-all-3.7.1.tar.gz cd protobuf-3.7.1/ ./configure make && make check && make install cd ./python/ python3 setup.py build python3 setup.py test python3 setup.py install protoc --version
接着安裝antlr4-python3windows
pip3 install antlr4-python3-runtimeui
驗證Python3模塊是否被正確安裝
#python3
>>>import google.protobuf google
若是沒有報錯,說明安裝正常。.net
windows下面的安裝參考以下連接code
https://blog.fudenglong.site/2017/11/17/%E5%9C%A8python3%E4%B8%AD%E4%BD%BF%E7%94%A8google%E7%9A%84protobuf/blog
python的安裝參考以下ip
https://blog.csdn.net/weiwangchao_/article/details/80396104