Install BOSCLI
Prerequisites
The BOS CLI command line interface (i.e., BCE CLI) is developed based on Python 2.7. Install the corresponding Python 2.7 according to the OS; currently, it supports Windows and Linux.
Operation step
- Set up the Python environment.
-
Windows environment
Download python27.msi from the Python official website, then double click to install it.
-
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-pip
Note:After installing Python, please first execute
Python -Vto check the Python version information, ensuring that the Python version is 2.7 or later. For users using the Baidu AI Cloud BCC Centos6.5 system, please install it according to the subsequent Installation Method for Users of Baidu AI Cloud BCC Centos6.5 System
- Install BOS CLI toolDownload address
-
Windows environment
(1) Extract the CLI toolkit.
(2) Execute the following command in cmd.
Plain Text1cd $ BCE_PATH 2$ python setup.py install(3) Copy the "bce" folder to the directory where the user plans to run the program for easier access.
Plain Text1$ python $YOUR_DIR/bce -
Linux environment
(1) Extract the CLI toolkit.
Plain Text1$ unzip bce-cli-0.10.8.zip(2) Install the bcecli library into the Python directory on your system.
Plain Text1$ python setup.py install
Installation Method for Users of Baidu AI Cloud BCC Centos 6.5 System:
- First, download the BCC CentOS 6.5 Image-Specific CLI.
-
Extract the CLI toolkit.
Plain Text1$ 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.
Plain Text1export PATH=bce-cli-path:$PATHNote: For example,if the unzipped path of bce-cli-0.10.8-centos6.5.zip is /home/user1/bce-cli-0.10.8-centos6.5, you need to add the path /home/user1/bce-cli-0.10.8-centos6.5/ to the environment variables.
