百度智能云

All Product Document

          Virtual Private Cloud

          Install BCE-CLI

          To make it convenient for the users to use the API of network service, Baidu AI Cloud provides a mode to call VPC services by the command line tool BCE CLI (Command Line Interface). This tool is realized based on BCE Python SDK.

          Preconditions

          • BCE CLI command line tool based on Python 2.7 development, is installed with corresponding according to the operating system, Python 2.7, currently supporting Linux.

          Operation steps

          1.Prepare for Python environment.

          • Linux environment

            Take Ubuntu and Redhat as examples:

            # Ubuntu
            $ sudo apt-get install python python-dev python-setuptools python-pip
            
            # Redhat
            $ sudo yum install python python-dev python-setuptools python-pip

          Note: Please execute python -V to view the version information of python after the python is installed, and ensure the version of python indicated is 2.7 or later. The users using the BCC Centos 6.5 system of Baidu AI Cloud can use the Exclusive Version CLI of BCC Centos 6.5 Image. For the detailed installation steps, refer to the instructions below.

          2.Install BCE CLI Tool Enter CLI Download Address, in BOS CLI Select a suitable tool kit according to your operation system.

          In Linux environment,

          (1) Extract CLI kit.

              $ unzip bce-cli-0.8.3.zip

          (2) Install the library of bcecli under the python directory of the system.

              $ python setup.py install
          
          Up to this point, the installation is completed. 

          To install the BCC Centos 6.5 system, refer to the following operation steps.

          Installation steps for exclusive version CLI of BCC Centos 6.5 Image:

          First download the exclusive version CLI of BCC Centos 6.5 Image, and unzip the CLI tool kit.

          $ unzip bce-cli-0.10.8-centos6.5.zip

          Add the installation directory of bce-cli-0.10.8-centos6.5 into the environmental variables.

          export PATH=bce-cli-path:$PATH

          Note: For example, the path is /home/user1/bce-cli-0.10.8-centos6.5 after extraction of bce-cli-0.10.8-centos6.5.zip, you need to add the path /home/user1/bce-cli-0.10.8-centos6.5/ into the environmental variable.

          Previous
          SDK
          Next
          Configure BCE-CLI