python 安裝protobuf

安裝準備:python和protoc(編譯proto到各個語言)python

下載protobuf源代碼(各類語言實現):https://github.com/google/protobuf git

一、到Python目錄,編譯 
python setup.py build 
python setup.py install 
python setup.py testgithub

二、驗證安裝是否成功ui

#python >>>import google.protobuf 

若是報錯,檢查錯誤。若是是protoc沒找到,能夠到./src下編譯出protoc,或者直接下載protoc-3.2.0-win32 release版(https://github.com/google/protobuf/releases),把protoc被放到./src. google

相關文章
相關標籤/搜索