Install the SDK Package

ET

  • API Reference
    • API function release records
    • Appendix
    • Common Request Headers and Response Headers
    • Dedicated Line Related Interfaces
      • Add dedicated channel routing parameters
      • Add dedicated channel user object
      • Apply for physical dedicated line
      • Associate dedicated channel
      • Create dedicated channel
      • Create routing rules of Dedicated channel
      • Delete dedicated channel
      • Delete routing rules of dedicated channel
      • Disable dedicated channel IPv6 function
      • Disassociate dedicated channel
      • Enable IPv6 function for the dedicated channel
      • Modify the dedicated channel routing rules
      • Query dedicated channel
      • Query dedicated line details
      • Query dedicated line list
      • Query the routing rules of the dedicated channel
      • Remove dedicated channel route parameters
      • Remove dedicated channel user object
      • Resubmit the dedicated channel
      • Update dedicated channel
      • Update physical dedicated line
    • Error code
    • General Description
    • Interface Overview
    • Overview
    • Service domain
  • FAQs
    • General Problems
  • Function Release Records
  • Getting Started Guide
    • Getting Started Guide
    • On-Premises IDC and Cloud VPC Interconnection
      • Add dedicated channel
      • Add network instance
      • Apply for physical dedicated line
      • Configure user-side routing and test connectivity
      • Create dedicated gateway
  • Operation guide
    • Dedicated channel
      • Add cross-account dedicated channel
      • Add dedicated channel
      • Dedicated Channel Cross-Account Authorization for Cloud Smart Network
      • Dedicated Channel IPv6 Feature Configuration
      • Delete dedicated channel
      • Dynamic routing BGP configuration for dedicated channels
      • Static route configuration for dedicated channels
    • Dedicated gateway
      • Create dedicated gateway
      • Dedicated Gateway
    • Identity and access management
    • Monitor and Operations
      • Alarm Strategy Description
      • Dedicated Channel Instance Diagnosis
      • Fault Drill
    • Physical dedicated line
      • Apply for physical dedicated line
      • Express Tunnel process
      • Manage Physical Dedicated Line
      • Operation preparation
  • Product billing
    • Billing Item Description
    • Charge
    • Expiration description
    • Overdue description
  • Product Description
    • Application scenarios
    • Dedicated Line Access Point Address
    • Product advantages
    • Usage restrictions
    • What Is Dedicated Line Access
  • SDK
    • GO SDK
      • Dedicated line
      • Exception handling
      • Initialization
      • Install the SDK Package
      • Overview
      • Version history
    • Java-SDK
      • Dedicated line
      • Exception handling
      • Initialization
      • Install the SDK Package
      • Overview
      • Version history
    • Python SDK
      • Dedicated line
      • Function Release Records
      • Initialization
      • Install the SDK Package
      • Overview
  • Service Level Agreement (SLA)
    • Service Level Agreement (SLA)
  • Typical Practices
    • Connecting On-Premises IDC to Cloud VPC via Multi-Line ECMP (Dynamic Routing)
    • Connecting On-Premises IDC to Cloud VPC via Multi-Line ECMP (Static Routing)
    • Connecting On-Premises IDC to Cloud VPC via Primary and Backup Dedicated Lines (Dynamic Routing)
    • Connecting On-Premises IDC to Cloud VPC via Primary and Backup Dedicated Lines (Static Routing)
    • Interconnecting IDCs and VPCs Across Different Regions via Dedicated Lines
All documents
menu
No results found, please re-enter

ET

  • API Reference
    • API function release records
    • Appendix
    • Common Request Headers and Response Headers
    • Dedicated Line Related Interfaces
      • Add dedicated channel routing parameters
      • Add dedicated channel user object
      • Apply for physical dedicated line
      • Associate dedicated channel
      • Create dedicated channel
      • Create routing rules of Dedicated channel
      • Delete dedicated channel
      • Delete routing rules of dedicated channel
      • Disable dedicated channel IPv6 function
      • Disassociate dedicated channel
      • Enable IPv6 function for the dedicated channel
      • Modify the dedicated channel routing rules
      • Query dedicated channel
      • Query dedicated line details
      • Query dedicated line list
      • Query the routing rules of the dedicated channel
      • Remove dedicated channel route parameters
      • Remove dedicated channel user object
      • Resubmit the dedicated channel
      • Update dedicated channel
      • Update physical dedicated line
    • Error code
    • General Description
    • Interface Overview
    • Overview
    • Service domain
  • FAQs
    • General Problems
  • Function Release Records
  • Getting Started Guide
    • Getting Started Guide
    • On-Premises IDC and Cloud VPC Interconnection
      • Add dedicated channel
      • Add network instance
      • Apply for physical dedicated line
      • Configure user-side routing and test connectivity
      • Create dedicated gateway
  • Operation guide
    • Dedicated channel
      • Add cross-account dedicated channel
      • Add dedicated channel
      • Dedicated Channel Cross-Account Authorization for Cloud Smart Network
      • Dedicated Channel IPv6 Feature Configuration
      • Delete dedicated channel
      • Dynamic routing BGP configuration for dedicated channels
      • Static route configuration for dedicated channels
    • Dedicated gateway
      • Create dedicated gateway
      • Dedicated Gateway
    • Identity and access management
    • Monitor and Operations
      • Alarm Strategy Description
      • Dedicated Channel Instance Diagnosis
      • Fault Drill
    • Physical dedicated line
      • Apply for physical dedicated line
      • Express Tunnel process
      • Manage Physical Dedicated Line
      • Operation preparation
  • Product billing
    • Billing Item Description
    • Charge
    • Expiration description
    • Overdue description
  • Product Description
    • Application scenarios
    • Dedicated Line Access Point Address
    • Product advantages
    • Usage restrictions
    • What Is Dedicated Line Access
  • SDK
    • GO SDK
      • Dedicated line
      • Exception handling
      • Initialization
      • Install the SDK Package
      • Overview
      • Version history
    • Java-SDK
      • Dedicated line
      • Exception handling
      • Initialization
      • Install the SDK Package
      • Overview
      • Version history
    • Python SDK
      • Dedicated line
      • Function Release Records
      • Initialization
      • Install the SDK Package
      • Overview
  • Service Level Agreement (SLA)
    • Service Level Agreement (SLA)
  • Typical Practices
    • Connecting On-Premises IDC to Cloud VPC via Multi-Line ECMP (Dynamic Routing)
    • Connecting On-Premises IDC to Cloud VPC via Multi-Line ECMP (Static Routing)
    • Connecting On-Premises IDC to Cloud VPC via Primary and Backup Dedicated Lines (Dynamic Routing)
    • Connecting On-Premises IDC to Cloud VPC via Primary and Backup Dedicated Lines (Static Routing)
    • Interconnecting IDCs and VPCs Across Different Regions via Dedicated Lines
  • Document center
  • arrow
  • ET
  • arrow
  • SDK
  • arrow
  • Python SDK
  • arrow
  • Install the SDK Package
Table of contents on this page
  • Environment preparation
  • Download and installation
  • SDK directory structure
  • Uninstall SDK

Install the SDK Package

Updated at:2025-11-11

Environment preparation

  1. Runtime environment
    The Python SDK supports running in Python 2.7 and Python 3.x environments.
  2. Install pycrypto dependency
    Before installing the SDK, execute the command pip install pycrypto to install pycrypto dependency.
    If installation fails, execute pip 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

  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):

    Plain Text
    1pip install bce-python-sdk-version.zip  

You can then install the Python SDK to your local device.
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 ├── retry                           //Http request module
5 ├── services                        //Service public directory
6 │     └── et                        //ET directory
7 │           ├──__init__.py          //Empty
8 │           ├──et_client.py         //ET client entry class
9 ├── __init__                        //Partial constants for BCE client
10 ├── bce_base_client.py              //Base class for BCE client entry points
11 ├── bce_client_configuration.py     //General configuration class for BCE client
12 ├── bce_response.py                 //Request class for BCE client
13 ├── exception.py                    //BCE client exception class
14 ├── compact.py                      //String compatibility class for PY2, PY3{-1-}
15 ├── protocol.py                     //Network protocol definition
16 ├── region.py                       //Region processing module
17 └── utils.py                        //BCE common utilities
18    

Uninstall SDK

Use pip to uninstall "bce-python-sdk" as intended.

Previous
Initialization
Next
Overview