Install BCE-CLI
To make it easier for users to leverage network service APIs, Baidu AI Cloud provides the ability to call VPC services using the BCE Command Line Interface (CLI), which is built on the BCE Python SDK.
Prerequisites
- The BCE CLI is developed based on Python 2.7. Install the corresponding Python 2.7 according to OS. Currently, Linux is supported.
Operation step
-
Ensure the Python environment is prepared.
- Linux environment
Take Ubuntu and Redhat as examples:
Plain Text1# Ubuntu 2$ sudo apt-get install python python-dev python-setuptools python-pip 3 4# Redhat 5$ sudo yum install python python-dev python-setuptools python-pipNote:After installing Python, please first execute
Python -Vto check the Python version information, ensuring that the Python version is 2.7 or later. Users of Baidu AI Cloud BCC CentOS 6.5 system can use the BCC CentOS 6.5 Image-Specific CLI. Refer to the later section for detailed installation steps. -
Install BCE CLI. Enter [CLI download address](BOS/Peripheral Tools/Download Zone.md), and under BOS CLI, select the appropriate toolkit for your OS.
Under Linux environment,
(1) Extract the CLI toolkit.
Plain Text1$ unzip bce-cli-0.8.3.zip(2) Install the bcecli library into the Python directory on your system.
Plain Text1$ python setup.py installThe installation is now complete.
To install the BCC on the CentOS 6.5 system, follow these steps.
BCC CentOS 6.5 Image-Specific CLI Installation Steps:
First, download the CLI toolkit specific to the BCC CentOS 6.5 image and extract it.
1$ unzip bce-cli-0.10.8-centos6.5.zip
Add the installation path of bce-cli-0.10.8-centos6.5 to your environment variables.
1export PATH=bce-cli-path:$PATH
Note: For instance, if the CLI toolkit from bce-cli-0.10.8-centos6.5.zip is extracted to /home/user1/bce-cli-0.10.8-centos6.5, you must add /home/user1/bce-cli-0.10.8-centos6.5/ to the environment variables.
