百度智能云

All Product Document

          Cloud Monitor

          Install SDK

          Install the SDK Package

          Environment preparation

          1. Runtime environment

            The Python SDK toolkit supports Python versions 2.7 and 3.

          2. Install pycrypto dependency

            Before installing the SDK, execute the command pip install pycrypto to install pycrypto dependency.

          Download and installation

          Method I: Install via pip

          You can install Baidu AI Cloud Python SDK into your environment via pip installation method. When connected to the network, execute the following command in the command line:

          pip install bce-python-sdk

          You can now install the Python SDK to your local machine.

          Method II: Download the source package locally for installation

          1. Download the Python SDK compression toolkit from Developer Resource Center.
          2. Navigate the command line to the path where the compressed package is located, and execute the following command (replace version with the version number in the package name):

            pip install bce-python-sdk-version.zip

            You can now install the Python SDK to your local machine.

          Method III: Install using setup.py install file

          Alternatively, after decompressing the compressed package, you can execute the following command (replace version with the version number in the package name).

          cd bce-python-sdk-version
          
          python setup.py install

          SDK directory structure

          baidubce
           ├── auth                            //Public permission directory
           ├── http                          //Http request module
           ├── services                        //Service public directory
           │     └── bcm                       //BCM Catalog
           │           ├──bcm_client.py        //BCM client entry class
           ├── bce_base_client.py              //Base class for BCE client entry points
           ├── bce_client_configuration.py     //HttpClient Configuration class for BCE client
           ├── bce_response.py                 //Request class for BCE client
           ├── exception.py                    //BCE client exception class
           ├── protocol.py                     //Network protocol definition
           ├── region.py                       //Region processing module
           ├── retry_policy.py                 //Common Configuration class for BCE service
           └── utils.py                        //BCE common utilities

          Uninstall SDK

          To uninstall SDK, execute the command pip uninstall bce-python-sdk to complete the uninstallation.

          Previous
          Initialization
          Next
          Overview