日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關咨詢
選擇下列產(chǎn)品馬上在線溝通
服務時間:8:30-17:00
你可能遇到了下面的問題
關閉右側工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
CentOS6.5下Python版本的ProtoBuf編譯及安裝

因為要學習faster r-cnn,在搭建環(huán)境的時,發(fā)現(xiàn)原本通過yum安裝的protobuf沒有安裝python版本以及其他一系列版本版本兼容性問題,導致我必須用編譯方式重新安裝protobuf2.5

下載源碼

首先,從github上下載protobuf的源碼,地址:https://github.com/google/protobuf,我選擇下載2.5.0版本。

編譯protobuf

然后將下載的壓縮包解壓縮

unzip protobuf-2.5.0.zip

autogen.sh代碼片段

# Check that gtest is present. Usually it is already there since the
# directory is set up as an SVN external.
# 判斷是否存在gtest目錄
if test ! -e gtest; then
  echo "Google Test not present. Fetching gtest-1.5.0 from the web..."
  #如果目錄不存在則嘗試從google.com下載并解壓縮,如果google被墻則下載失敗
  curl http://googletest.googlecode.com/files/gtest-1.5.0.tar.bz2 | tar jx
  #將解壓縮后的目錄改名為gtest
  mv gtest-1.5.0 gtest
fi

googletest1.5.0可以到主機寶貝資源站下載:

具體下載目錄在 /2017年資料/3月/27日/CentOS6.5下Python版本的ProtoBuf編譯及安裝/

#解壓縮
unzip gtest-1.5.0.zip  
mv gtest-1.5.0 gtest

執(zhí)行protobuf編譯

#執(zhí)行autogen.sh生成configure
./autogen.sh  
./configure
# -j8 多線程編譯
make -j8
make check
# 安裝編譯成功的protobuf
sudo make install

安裝python模塊

cd python 
python setup.py build 
python setup.py test 
python setup.py install

驗證Python模塊

驗證Python模塊是否被正確安裝
如果沒有報錯,說明安裝正常。

$ python 
>>> import google.protobuf.internal
>>> 

網(wǎng)站標題:CentOS6.5下Python版本的ProtoBuf編譯及安裝
當前鏈接:http://www.5511xx.com/article/cojjeio.html