Install the Python probe in a uv environment

Updated at:
Copy as MD

If you manage Python dependencies with uv, you can install the ARMS Python probe through uv pip and launch your application with automatic instrumentation. This enables performance monitoring, Tracing Analysis, and anomaly detection for your Python application.

Prerequisites

Before you begin, make sure that you have:

  • uv installed

  • wget available on your system

  • Your Alibaba Cloud region ID

Step 1: Download and extract the probe package

Download the probe package from the OSS endpoint that matches your region, then extract it:

wget "http://arms-apm-<region-id>.oss-<region-id>.aliyuncs.com/aliyun-python-agent/aliyun-python-agent.tar.gz"
tar -zxvf aliyun-python-agent.tar.gz

Replace <region-id> with your region ID. For example, for the China (Hangzhou) region:

wget "http://arms-apm-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/aliyun-python-agent/aliyun-python-agent.tar.gz"
tar -zxvf aliyun-python-agent.tar.gz

This creates an aliyun-python-agent/ directory containing the probe wheel files.

Pin a specific probe version

To install a specific Python probe version, add the version number to the URL path:

wget "http://arms-apm-<region-id>.oss-<region-id>.aliyuncs.com/aliyun-python-agent/<version>/aliyun-python-agent.tar.gz"
PlaceholderDescriptionExample
<region-id>Alibaba Cloud region IDcn-hangzhou
<version>Python probe version1.8.0

Example:

wget "http://arms-apm-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/1.8.0/aliyun-python-agent/aliyun-python-agent.tar.gz"

Step 2: Install the probe with uv

Install the probe wheel files into your current Python environment:

uv pip install aliyun-python-agent/target/*.whl

Step 3: Run your application with the probe

Start your application through aliyun-instrument for automatic instrumentation:

uv aliyun-instrument python3 app.py

Replace app.py with your application entry point.

See also