python 安裝protobuf


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

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

1、到Python目錄,編譯 
python setup.py build 
python setup.py install 
python setup.py test

2、驗證安裝是否成功

  #python >>>import google.protobuf 

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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM