Install the SDK Package
Updated at:2025-10-16
Runtime environment
- The Python SDK supports both Python 2.7 and Python 3 environments.
- Before installing the SDK, execute the command
pip install pycryptoto install pycrypto dependency.
If installation fails, executepip install pycryptodome.
Download and installation
Method 1: Install via pip
You can install the Baidu AI Cloud Python SDK into your environment using the pip installation method. While connected to the internet, execute the following command in the command line:
Plain Text
1pip install bce-python-sdk
You can now install the Python SDK to your local machine.
Method 2: Download the source package locally for installation
- Download Python SDK from the official website.
- 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):
Plain Text
1pip install bce-python-sdk-version.zip
You can now install the Python SDK to your local machine.
Alternatively, after decompressing the compressed package, you can execute the following command (replace version with the version number in the package name).
Plain Text
1cd bce-python-sdk-version
2python setup.py install
Complete the SDK installation process.
SDK directory structure
Plain Text
1baidubce
2 ├── auth //Public permission directory
3 ├── http //Http request module
4 ├── services //Service public directory
5 │ └── eip //EIP directory
6 │ ├──eip_client.py //EIP client entry class
7 │ ├──model.py //EIP internal models, such as Billing
8 │ ├──eip_group_client.py //EIPGROUP client entry class
9 │ └──eip_group_model.py //Internal EIPGroup models (e.g., billing)
10 │ └──eip_tp_client.py //EIPTp client entry class
11 │ └──eip_bp_client.py //EIPBp client entry class
12 ├── bce_base_client.py //Base class for BCE client entry points
13 ├── bce_client_configuration.py //HttpClient configuration class
14 ├── bce_response.py //Request class for BCE client
15 ├── exception.py //BCE client exception class
16 ├── protocol.py //Network protocol definition
17 ├── region.py //Region processing module
18 ├── retry_policy.py //Common Configuration class for BCE service
19 └── utils.py //BCE common utilities
Uninstall SDK
Use pip to uninstall "bce-python-sdk" as intended.
