Set up your local environment to send and subscribe to messages with the ApsaraMQ for RocketMQ SDK for Python.
Prerequisites
Python 2.5 or later Download Python. To check your installed version, run:
SDK version Python version Later than v1.0.0 2.5 or later (Python 3.x supported) v1.0.0 2.5 or later, earlier than 3.0 python -Vpip (Python package manager) Install pip.
Note pip is bundled with Python 3.4 and later. If you run Python 3.4+, skip this step.
Install the SDK
(Optional) Create and activate a virtual environment to isolate dependencies:
python -m venv .venv# Linux or macOS source .venv/bin/activate# Windows .venv\Scripts\activateInstall the
mq_http_sdkpackage:pip install mq_http_sdkVerify the installation: A successful installation displays the package name, version, and install path.
pip show mq_http_sdk
What's next
Use the SDK to send and subscribe to messages. For more information, see the following topics:
Send messages
Subscribe to messages