Python version protobuf installation

Source: Internet
Author: User

Transferred from: http://www.tuicool.com/articles/VfQfM3

1. Download Protobuf source code (currently the latest version is: 2.5.0)
#cd/opt
#wget https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz

2. Unzip, compile, install
#tar ZXVF protobuf-2.5.0.tar.gz
#cd protobuf-2.5.0
#./configure
#make
#make Check
#make Install

3. Continue to install the Protobuf Python module (Skip this step if you are not using Python)
#cd./python
#python setup.py Build
#python setup.py Test
#python setup.py Install

4. Install complete, verify the Linux command
#protoc –version

5. Verify that the Python module is installed correctly
#python
>>>import Google.protobuf
If no error is indicated, the installation is normal.

Note:

Error:package directory ' Google/protobuf/compiler ' does not exist

Workaround: Create the compiler folder under google/protobuf/

Run again under the Protobuf folder: Python setup.py install

Python version protobuf installation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.